You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm defining a sort parameter in multiple get requests in different spec files. When generating the schemas, I get:
Error: Schema must contain uniquely named types but contains multiple types named "SortInput".
at typeMapReducer (/Users/amansouri/repos/voxsupFrontend2/services/graphql/node_modules/graphql/type/schema.js:262:13)
at typeMapReducer (/Users/amansouri/repos/voxsupFrontend2/services/graphql/node_modules/graphql/type/schema.js:293:20)
at Array.reduce (<anonymous>)
at typeMapReducer (/Users/amansouri/repos/voxsupFrontend2/services/graphql/node_modules/graphql/type/schema.js:285:34)
at Array.reduce (<anonymous>)
at new GraphQLSchema (/Users/amansouri/repos/voxsupFrontend2/services/graphql/node_modules/graphql/type/schema.js:145:28)
at SchemaComposer.buildSchema (/Users/amansouri/repos/voxsupFrontend2/services/graphql/node_modules/graphql-compose/lib/SchemaComposer.js:130:12)
at _callee$ (/Users/amansouri/repos/voxsupFrontend2/services/graphql/src/modules/uam/index.js:100:33)
at tryCatch (/Users/amansouri/repos/voxsupFrontend2/services/graphql/node_modules/regenerator-runtime/runtime.js:45:40)
at Generator.invoke [as _invoke] (/Users/amansouri/repos/voxsupFrontend2/services/graphql/node_modules/regenerator-runtime/runtime.js:274:22)
at Generator.prototype.<computed> [as next] (/Users/amansouri/repos/voxsupFrontend2/services/graphql/node_modules/regenerator-runtime/runtime.js:97:21)
at asyncGeneratorStep (/Users/amansouri/repos/voxsupFrontend2/services/graphql/dist/modules/uam/index.js:70:103)
at _next (/Users/amansouri/repos/voxsupFrontend2/services/graphql/dist/modules/uam/index.js:72:194)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Is there a way I can change the input name here ?
The text was updated successfully, but these errors were encountered:
@papatego Sorry for the trouble. I believe OtG should append a number to the end of conflicting names so I am confused why this is occurring.
You can try printing out the schema to identify the problematic types and the corresponding schemas. Perhaps the equivalentToMessagesoption will help. If you are willing to make changes to the OAS, you can try to change the name of the input object but it depends on how the schema is referenced (for example, if it is a referenced component schema or not).
We are currently working on #379 which would give users complete control over naming.
If you can provide the OAS or a subset of it, we can look into debugging this issue.
I'm defining a sort parameter in multiple
get
requests in different spec files. When generating the schemas, I get:Is there a way I can change the input name here ?
The text was updated successfully, but these errors were encountered: