View Source argo_graphql_selection_set (argo v1.0.4)

Summary

Types

-type fold_fields_action() :: cont | halt.
-type fold_fields_func(Acc) :: fold_fields_func(Acc, Acc).
-type fold_fields_func(AccIn, AccOut) ::
    fun((argo_graphql_field:t(), argo_graphql_executable_document:t(), AccIn) ->
            fold_fields_result(AccOut)).
-type fold_fields_result(AccOut) :: fold_fields_action() | {fold_fields_action(), AccOut}.
-type shape() :: #{argo_types:name() => {argo_types:name(), shape()}}.
-type t() :: #argo_graphql_selection_set{selections :: [argo_graphql_selection_set:selection()]}.

Functions

Link to this function

add_field(SelectionSet, Field)

View Source
-spec add_field(SelectionSet, Field) -> SelectionSet
             when SelectionSet :: t(), Field :: argo_graphql_field:t().
Link to this function

add_fragment_spread(SelectionSet, FragmentSpread)

View Source
-spec add_fragment_spread(SelectionSet, FragmentSpread) -> SelectionSet
                       when
                           SelectionSet :: t(), FragmentSpread :: argo_graphql_fragment_spread:t().
Link to this function

add_inline_fragment(SelectionSet, InlineFragment)

View Source
-spec add_inline_fragment(SelectionSet, InlineFragment) -> SelectionSet
                       when
                           SelectionSet :: t(), InlineFragment :: argo_graphql_inline_fragment:t().
Link to this function

add_selection(SelectionSet, Selection)

View Source
-spec add_selection(SelectionSet, Selection) -> SelectionSet
                 when SelectionSet :: t(), Selection :: selection().
Link to this function

find_field(SelectionSet, FieldAliasOrName, ExecutableDocument)

View Source
-spec find_field(SelectionSet, FieldAliasOrName, ExecutableDocument) -> {ok, Field} | error
              when
                  SelectionSet :: t(),
                  FieldAliasOrName :: argo_types:name(),
                  ExecutableDocument :: argo_graphql_executable_document:t(),
                  Field :: argo_graphql_field:t().
Link to this function

fold_fields(SelectionSet, AccIn, Fun, ExecutableDocument)

View Source
-spec fold_fields(SelectionSet, AccIn, Fun, ExecutableDocument) -> AccOut
               when
                   SelectionSet :: t(),
                   AccIn :: dynamic(),
                   Fun :: fold_fields_func(AccIn, AccOut),
                   ExecutableDocument :: argo_graphql_executable_document:t(),
                   AccOut :: dynamic().
Link to this function

format(Formatter1, Type)

View Source
-spec format(Formatter1, Type :: t()) -> Formatter2
          when Formatter1 :: argo_graphql_formatter:t(), Formatter2 :: argo_graphql_formatter:t().
-spec format_error(dynamic(), dynamic()) -> dynamic().
Link to this function

format_shorthand(Formatter1, Type)

View Source
-spec format_shorthand(Formatter1, Type :: t()) -> Formatter2
                    when
                        Formatter1 :: argo_graphql_formatter:t(),
                        Formatter2 :: argo_graphql_formatter:t().
Link to this function

from_language(LanguageSelectionSet)

View Source
-spec from_language(LanguageSelectionSet) -> SelectionSet
                 when
                     LanguageSelectionSet :: argo_graphql_language_selection_set:t(),
                     SelectionSet :: t().
Link to this function

get_shape(SelectionSet, ExecutableDocument)

View Source
-spec get_shape(SelectionSet, ExecutableDocument) -> Shape
             when
                 SelectionSet :: t(),
                 ExecutableDocument :: argo_graphql_executable_document:t(),
                 Shape :: shape().
-spec new() -> SelectionSet when SelectionSet :: t().