当我将现有的GrpahqlSchema传递给buildFederatedSchema
时,我遇到了错误
Cannot read property 'kind' of undefined
这是因为当我将GrpahqlSchema传递给buildFederatedSchema时,它的验证失败。
at Object.validateSDL (/Users/alti/Projects/woundtech/woundtech-fhir-graphql/node_modules/graphql/validation/validate.js:62:24)
at Object.buildSchemaFromSDL (/Users/alti/Projects/woundtech/woundtech-fhir-graphql/node_modules/apollo-graphql/lib/schema/buildSchemaFromSDL.js:36:31)
at buildFederatedSchema (/Users/alti/Projects/woundtech/woundtech-fhir-graphql/node_modules/@apollo/federation/dist/service/buildFederatedSchema.js:32:35)
此https://github.com/apollographql/apollo-server/pull/3013上有一个公开PR。除此之外,还有其他选择吗?
答案 0 :(得分:0)
您可能在不同的graphql模式中具有相同名称的类型。