Skip to content

Change Input Type name #389

@papatego

Description

@papatego

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions