View Source argo_graphql_selection_set (argo v1.0.1)
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 selection() :: argo_graphql_field:t() | argo_graphql_fragment_spread:t() | argo_graphql_inline_fragment:t().
-type shape() :: #{argo_types:name() => {argo_types:name(), shape()}}.
-type t() :: #argo_graphql_selection_set{}.
Functions
-spec add_field(SelectionSet, Field) -> SelectionSet when SelectionSet :: t(), Field :: argo_graphql_field:t().
-spec add_fragment_spread(SelectionSet, FragmentSpread) -> SelectionSet when SelectionSet :: t(), FragmentSpread :: argo_graphql_fragment_spread:t().
-spec add_inline_fragment(SelectionSet, InlineFragment) -> SelectionSet when SelectionSet :: t(), InlineFragment :: argo_graphql_inline_fragment:t().
-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().
-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().
-spec format(Formatter1, Type :: t()) -> Formatter2 when Formatter1 :: argo_graphql_formatter:t(), Formatter2 :: argo_graphql_formatter:t().
-spec format_error(dynamic(), dynamic()) -> dynamic().
-spec format_shorthand(Formatter1, Type :: t()) -> Formatter2 when Formatter1 :: argo_graphql_formatter:t(), Formatter2 :: argo_graphql_formatter:t().
-spec from_language(LanguageSelectionSet) -> SelectionSet when LanguageSelectionSet :: argo_graphql_language_selection_set:t(), SelectionSet :: t().
-spec get_shape(SelectionSet, ExecutableDocument) -> Shape when SelectionSet :: t(), ExecutableDocument :: argo_graphql_executable_document:t(), Shape :: shape().
-spec new() -> SelectionSet when SelectionSet :: t().