pub struct FragmentDefinition<'a> {
pub name: NamedType<'a>,
pub type_condition: NamedType<'a>,
pub directives: Directives<'a>,
pub selection_set: SelectionSet<'a>,
}
Expand description
AST Node for a Fragment definition with an additional Selection Set.
This may only be applied when the type condition matches or when no type condition is present
and extends a Selection Set by being applied using a FragmentSpread
selection.
Reference
Fields§
§name: NamedType<'a>
A given name of the Fragment Definition that is used by FragmentSpread selections to refer to this definition.
type_condition: NamedType<'a>
A given type condition’s type name that must match before this fragment is applied on a GraphQL API. On inline fragments this is optional and no type condition has to be passed.
directives: Directives<'a>
Directives that are annotating this Fragment.
When no Directives are present, this will be an empty
list, as can be checked using Directives::is_empty
.
See: Directives
selection_set: SelectionSet<'a>
A sub-Selection Set that is applied when this Fragment is applied to the parent Selection Set. See: SelectionSet
Trait Implementations§
Source§impl<'a> Clone for FragmentDefinition<'a>
impl<'a> Clone for FragmentDefinition<'a>
Source§fn clone(&self) -> FragmentDefinition<'a>
fn clone(&self) -> FragmentDefinition<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more