-
Notifications
You must be signed in to change notification settings - Fork 163
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Fragments can be used to select a specific type on an interface/union.
e.g.
type Dog {
name: String!
hasFlappyEars: Boolean!
hasWaggingTail: Boolean!
}
type Cat {
meows: Boolean!
mischievous: Boolean!
favouriteFood: String!
}
union Pet = Dog | Cat
fragment DogAttributes on Dog {
hasFlappyEars
hasWaggingTail
}
# We can then query on a Pet field this way:
myPet {
...DogAttributes
}
# This is equivalent to:
myPet {
...on Dog {
...DogAttributes
}
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request