Trait cynic::InlineFragments[][src]

pub trait InlineFragments: Sized {
    type TypeLock;
    type Arguments: FragmentArguments;
    fn graphql_type() -> String;
fn fragments(
        context: FragmentContext<'_, Self::Arguments>
    ) -> Vec<(String, SelectionSet<'static, Self, Self::TypeLock>)>;
fn fallback(
        context: FragmentContext<'_, Self::Arguments>
    ) -> Option<SelectionSet<'static, Self, Self::TypeLock>>; }
Expand description

Indicates that a type may be used to select one or more members of an interface/union type.

Similar to a collection of inline fragments in a GraphQL query.

Associated Types

The type lock for the GraphQL interface/union type these fragments are selected on.

The arguments that are required to select these fragments.

Required methods

The GraphQL type name that this InlineFragments selects

Returns a SelectionSet that selects the fragments for this type with the arguments provided in the context

Returns an optional fallback SelectionSet for when the returned type does not match any of the types supported by this InlineFragments

Implementors