public interface GQLFragment extends GQLSelection
interface Character {
name: String!
appears_in: [Movie!]!
}
type Human implements Character {
height: Float!
}
type Droid implements Character {
purpose: String!
}
union CharacterUnion = Human | Droid
type Query {
hero: CharacterUnion
}
And the query document:
{
hero {
name
... on Droid {
purpose
}
... HumanFields
}
}
fragment HumanFields on Human {
height
}
Here ...of Droid is an inline fragment, and
HumanFields is a fragment reference and definition.| Modifier and Type | Method and Description |
|---|---|
List<GQLSelection> |
getSelectionSet() |
net.morimekta.providence.descriptor.PMessageDescriptor<?> |
getTypeCondition()
All fragments represent a specific message type of a union
field, or an interface implementation.
|
default boolean |
isApplicableFor(net.morimekta.providence.descriptor.PMessageDescriptor<?> containingType) |
getSelection, hasSelection, hasSelectionPath@Nonnull net.morimekta.providence.descriptor.PMessageDescriptor<?> getTypeCondition()
@Nonnull List<GQLSelection> getSelectionSet()
getSelectionSet in interface GQLSelectiondefault boolean isApplicableFor(net.morimekta.providence.descriptor.PMessageDescriptor<?> containingType)
containingType - Containing type to check.Copyright © 2015–2020 morimekta.net. All rights reserved.