For example, a Pet
is an Animal
with an owner
and name
.
type Animal {
species: String
}
type Pet extends Animal {
owner: Owner
name: String
}
For example, a Pet
is an Animal
with an owner
and name
.
type Animal {
species: String
}
type Pet extends Animal {
owner: Owner
name: String
}
This is currently not possible in GraphQL, however there is an experimental package out there that might be useful for this purpose.
https://github.com/Sydsvenskan/node-graphql-partials
See example:
Which results in:
What you can also do, since these are just strings is to create some helper functions that modify the string and insert the necessary fields.
If you are intereseted in following the discussion on Github, you can have a look at the following issue.
https://github.com/graphql/graphql-js/issues/703