gatsby-graphql-toolkit
gatsby-graphql-toolkit copied to clipboard
Import interfaces from source schema
Is it possible to define an interface in my source schema and properly reflect it in the Gatsby schema?
Example:
interface Person {
name: String!
}
type Employee implements Person {
name: String!
department: String!
}
type Client implements Person {
name: String!
company: String!
}
Both Employee
and Client
are nodes that are sourced to Gatsby, but the interface is dropped entirely. If a field returns the Person
type, the interface will be created and correctly applied to Employee
and Client
, but it won't contain any fields except remoteTypeName
.
I would be great to be able to run a reusable fragment against an interface:
fragment Person {
name
}
But if i'm not mistaken, this is not possible right now?