Trait cynic::QueryFragment [−][src]
pub trait QueryFragment {
type SelectionSet;
type Arguments: FragmentArguments;
fn fragment(
context: FragmentContext<'_, Self::Arguments>
) -> Self::SelectionSet;
fn graphql_type() -> String;
}
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.
Associated Types
type SelectionSet
type SelectionSet
The type of SelectionSet
that is output by this QueryFragment
The arguments that are required to select this fragment.
Required methods
fn fragment(context: FragmentContext<'_, Self::Arguments>) -> Self::SelectionSet
fn fragment(context: FragmentContext<'_, Self::Arguments>) -> Self::SelectionSet
Returns a SelectionSet
that selects this QueryFragment
with the arguments provided
in the context
fn graphql_type() -> String
fn graphql_type() -> String
The GraphQL type name that this QueryFragment
selects