Interface implements Interface of Graphql 15 syntax is not working
We found this issue when trying to implement our type system into graphql. We've got a big set types inheriting properties from common ancestors and all of the ancestors need a common interface so they can be queried.
Expected Behavior
Creating multi inheritance interfaces are working as described in the Graphql spec.
Actual Behavior
When trying to create an interface that implements an interface buildFederatedSchema fails with the error
"Error: Schema must contain uniquely named types but contains multiple types named XXX".
Affected version
- npm: "@apollo/federation": "^0.20.4"
Minimal runnable reproduction
The following type definition fails when creating the federated schema. "Error: Schema must contain uniquely named types but contains multiple types named A"
const { buildFederatedSchema } = require('@apollo/federation')
const { gql } = require('apollo-server-express')
const typeDefs = gql`
interface A { text: String }
interface B implements A { text: String number: Int}
`
const resolvers = {}
buildFederatedSchema([{ typeDefs, resolvers }])
A repository show casing the issue can be found here:
https://github.com/MerzDaniel/apollo-federation-if-impl-if
Just run npm i && npm start
PR introducing the feature
#30
Interface implements Interface of Graphql 15 syntax is not working
We found this issue when trying to implement our type system into graphql. We've got a big set types inheriting properties from common ancestors and all of the ancestors need a common interface so they can be queried.
Expected Behavior
Creating multi inheritance interfaces are working as described in the Graphql spec.
Actual Behavior
When trying to create an interface that implements an interface
buildFederatedSchemafails with the error"Error: Schema must contain uniquely named types but contains multiple types named XXX".
Affected version
Minimal runnable reproduction
The following type definition fails when creating the federated schema. "Error: Schema must contain uniquely named types but contains multiple types named A"
A repository show casing the issue can be found here:
https://github.com/MerzDaniel/apollo-federation-if-impl-if
Just run
npm i && npm startPR introducing the feature
#30