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
GraphQLError: Type ExternalType must define one or more fields.
at Object.err (/Users/kgrant/git/print-subgraph-schema-error/node_modules/@apollo/federation-internals/src/error.ts:36:60)
at Validator.addError (/Users/kgrant/git/print-subgraph-schema-error/node_modules/@apollo/federation-internals/src/validate.ts:138:45)
at Validator.validateObjectOrInterfaceType (/Users/kgrant/git/print-subgraph-schema-error/node_modules/@apollo/federation-internals/src/validate.ts:168:12)
at Validator.validate (/Users/kgrant/git/print-subgraph-schema-error/node_modules/@apollo/federation-internals/src/validate.ts:90:16)
at validateSchema (/Users/kgrant/git/print-subgraph-schema-error/node_modules/@apollo/federation-internals/src/validate.ts:30:32)
at Schema.validate (/Users/kgrant/git/print-subgraph-schema-error/node_modules/@apollo/federation-internals/src/definitions.ts:1606:42)
at Subgraph.validate (/Users/kgrant/git/print-subgraph-schema-error/node_modules/@apollo/federation-internals/src/federation.ts:1766:19)
at buildSubgraph (/Users/kgrant/git/print-subgraph-schema-error/node_modules/@apollo/federation-internals/src/federation.ts:1329:19)
at printSubgraphSchema (/Users/kgrant/git/print-subgraph-schema-error/node_modules/@apollo/subgraph/src/printSubgraphSchema.ts:16:33)
at Object.<anonymous> (/Users/kgrant/git/print-subgraph-schema-error/src/print-schema.ts:4:32) {
message: '[<unnamed>] Type ExternalType must define one or more fields.',
path: undefined,
locations: undefined,
extensions: { code: 'INVALID_GRAPHQL' }
}
Issue Description
If your subgraph has a schema that references an external type, e.g.
and you have a transformer applied to the schema, e.g.
Then
printSubgraphSchema
will fail with the errorLink to Reproduction
https://github.com/kal4l/print-subgraph-schema-error
Reproduction Steps
Version
"@apollo/subgraph": "2.5.7"
The text was updated successfully, but these errors were encountered: