Trait cynic::QueryFragment

source ·
pub trait QueryFragment<'de>: Deserialize<'de> {
    type SchemaType;
    type Variables: QueryVariables;

    const TYPE: Option<&'static str> = None;

    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§

The type in a schema that this QueryFragment represents

The variables that are required to execute this QueryFragment

Provided Associated Constants§

The name of the type in the GraphQL schema

Required Methods§

Adds this fragment to the query being built by builder

Implementations on Foreign Types§

Implementors§