Is it possible to specify a type that implements multiple interfaces within a GraphQL schema? If so, how would this be accomplished?
Is it possible to specify a type that implements multiple interfaces within a GraphQL schema? If so, how would this be accomplished?
I think yes, it should be possible as the specification describes on http://facebook.github.io/graphql/June2018/#sec-Interfaces.
Here is the example.
interface NamedEntity {
name: String
}
interface ValuedEntity {
value: Int
}
type Person implements NamedEntity {
name: String
age: Int
}
type Business implements NamedEntity & ValuedEntity {
name: String
value: Int
employeeCount: Int
}