View Source argo_graphql_fragment_definition (argo v1.0.8)
Summary
Types
-type t() :: #argo_graphql_fragment_definition{name :: argo_types:name(), type_condition :: argo_types:name(), selection_set :: argo_graphql_selection_set:t(), directives :: argo_graphql_directives:t()}.
Functions
-spec add_directive(FragmentDefinition, Directive) -> FragmentDefinition when FragmentDefinition :: t(), Directive :: argo_graphql_directive:t().
-spec add_selection(FragmentDefinition, Selection) -> FragmentDefinition when FragmentDefinition :: t(), Selection :: argo_graphql_selection_set:selection().
Link to this function
find_field(FragmentDefinition, FieldAliasOrName, ExecutableDocument)
View Source-spec find_field(FragmentDefinition, FieldAliasOrName, ExecutableDocument) -> {ok, Field} | error when FragmentDefinition :: t(), FieldAliasOrName :: argo_types:name(), ExecutableDocument :: argo_graphql_executable_document:t(), Field :: argo_graphql_field:t().
-spec fold_fields(FragmentDefinition, AccIn, Fun, ExecutableDocument) -> AccOut when FragmentDefinition :: t(), AccIn :: dynamic(), Fun :: argo_graphql_selection_set:fold_fields_func(AccIn, AccOut), ExecutableDocument :: argo_graphql_executable_document:t(), AccOut :: dynamic().
-spec format(Formatter1, Type :: t()) -> Formatter2 when Formatter1 :: argo_graphql_formatter:t(), Formatter2 :: argo_graphql_formatter:t().
-spec from_language(LanguageFragmentDefinition) -> FragmentDefinition when LanguageFragmentDefinition :: argo_graphql_language_fragment_definition:t(), FragmentDefinition :: t().
-spec get_shape(FragmentDefinition, ExecutableDocument) -> Shape when FragmentDefinition :: t(), ExecutableDocument :: argo_graphql_executable_document:t(), Shape :: argo_graphql_selection_set:shape().
-spec new(FragmentName, TypeCondition, SelectionSet) -> FragmentDefinition when FragmentName :: argo_types:name(), TypeCondition :: argo_types:name(), SelectionSet :: argo_graphql_selection_set:t(), FragmentDefinition :: t().