Trait cynic::QueryFragment
source · pub trait QueryFragment<'de>: Deserialize<'de> {
type SchemaType;
type Variables: QueryVariables;
const TYPE: Option<&'static str> = None;
// Required method
fn query(builder: SelectionBuilder<'_, Self::SchemaType, Self::Variables>);
}
Expand description
Indicates that a type may be used as part of a graphql query.
This will usually be derived, but can be manually implemented if required.
Required Associated Types§
sourcetype SchemaType
type SchemaType
The type in a schema that this QueryFragment
represents
sourcetype Variables: QueryVariables
type Variables: QueryVariables
The variables that are required to execute this QueryFragment
Provided Associated Constants§
Required Methods§
sourcefn query(builder: SelectionBuilder<'_, Self::SchemaType, Self::Variables>)
fn query(builder: SelectionBuilder<'_, Self::SchemaType, Self::Variables>)
Adds this fragment to the query being built by builder