Describe the bug
I’m using GraphQL Code Generator against a GraphQL endpoint backed by MongooseIM (URL below). Codegen fails while loading the schema with:
Schema must contain uniquely named types but contains multiple types named "Bool".
This prevents generating TS types.
Steps to reproduce
- Configure GraphQL Code Generator to load schema from the endpoint(s) below.
- Run
graphql-codegen.
Example config:
schema:
- <uri>
generates:
./src/__graphql__/generated/min-types.ts:
plugins:
- typescript
Generate to ./src/__graphql__/generated/min-types.ts
✖ Failed to load schema from https://stage-api.nsuna.com/query,https://stage-mim.nsuna.com/api/graphql:
Schema must contain uniquely named types but contains multiple types named "Bool".
Error: Schema must contain uniquely named types but contains multiple types named "Bool".
at new GraphQLSchema (.../node_modules/graphql/type/schema.js:219:15)
at Object.mapSchema (.../node_modules/@graphql-tools/utils/cjs/mapSchema.js:15:12)
at createWrappingSchema (.../node_modules/@graphql-tools/wrap/dist/index.cjs:87:16)
at wrapSchema2 (.../node_modules/@graphql-tools/wrap/dist/index.cjs:82:18)
at memoized (.../node_modules/@graphql-tools/utils/cjs/memoize.js:15:30)
at UrlLoader.load (.../node_modules/@graphql-tools/url-loader/cjs/index.js:219:51)
Describe the bug
I’m using GraphQL Code Generator against a GraphQL endpoint backed by MongooseIM (URL below). Codegen fails while loading the schema with:
This prevents generating TS types.
Steps to reproduce
graphql-codegen.Example config: