View Source argo_graphql_operation_definition (argo v1.0.6)

Summary

Types

-type t() ::
    #argo_graphql_operation_definition{operation ::
                                           argo_graphql_operation_definition:operation_type(),
                                       name :: none | {some, argo_types:name()},
                                       variables_definition ::
                                           argo_graphql_variables_definition:t(),
                                       directives :: argo_graphql_directives:t(),
                                       selection_set :: argo_graphql_selection_set:t(),
                                       shorthand :: boolean()}.

Functions

Link to this function

add_directive(OperationDefinition, Directive)

View Source
-spec add_directive(OperationDefinition, Directive) -> OperationDefinition
                 when OperationDefinition :: t(), Directive :: argo_graphql_directive:t().
Link to this function

add_selection(OperationDefinition, Selection)

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

add_variable_definition(OperationDefinition, VariableDefinition)

View Source
-spec add_variable_definition(OperationDefinition, VariableDefinition) -> OperationDefinition
                           when
                               OperationDefinition :: t(),
                               VariableDefinition :: argo_graphql_variable_definition:t().
Link to this function

find_field(OperationDefinition, FieldAliasOrName, ExecutableDocument)

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

fold_fields(OperationDefinition, AccIn, Fun, ExecutableDocument)

View Source
-spec fold_fields(OperationDefinition, AccIn, Fun, ExecutableDocument) -> AccOut
               when
                   OperationDefinition :: t(),
                   AccIn :: dynamic(),
                   Fun :: argo_graphql_selection_set: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().
Link to this function

from_language(LanguageOperationDefinition)

View Source
-spec from_language(LanguageOperationDefinition) -> OperationDefinition
                 when
                     LanguageOperationDefinition :: argo_graphql_language_operation_definition:t(),
                     OperationDefinition :: t().
Link to this function

get_shape(OperationDefinition, ExecutableDocument)

View Source
-spec get_shape(OperationDefinition, ExecutableDocument) -> Shape
             when
                 OperationDefinition :: t(),
                 ExecutableDocument :: argo_graphql_executable_document:t(),
                 Shape :: argo_graphql_selection_set:shape().
Link to this function

is_shorthand(OperationDefinition)

View Source
-spec is_shorthand(OperationDefinition) -> boolean() when OperationDefinition :: t().
-spec new(SelectionSet) -> OperationDefinition
       when SelectionSet :: argo_graphql_selection_set:t(), OperationDefinition :: t().
Link to this function

new(Operation, OptionName, SelectionSet)

View Source
-spec new(Operation, OptionName, SelectionSet) -> OperationDefinition
       when
           Operation :: operation_type(),
           OptionName :: none | {some, argo_types:name()},
           SelectionSet :: argo_graphql_selection_set:t(),
           OperationDefinition :: t().