View Source argo_graphql_operation_definition (argo v1.0.4)
Summary
Types
-type operation_type() :: argo_graphql_language_root_operation_type_definition:operation_type().
-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
-spec add_directive(OperationDefinition, Directive) -> OperationDefinition when OperationDefinition :: t(), Directive :: argo_graphql_directive:t().
-spec add_selection(OperationDefinition, Selection) -> OperationDefinition when OperationDefinition :: t(), Selection :: argo_graphql_selection_set:selection().
-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().
-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().
-spec format(Formatter1, Type :: t()) -> Formatter2 when Formatter1 :: argo_graphql_formatter:t(), Formatter2 :: argo_graphql_formatter:t().
-spec from_language(LanguageOperationDefinition) -> OperationDefinition when LanguageOperationDefinition :: argo_graphql_language_operation_definition:t(), OperationDefinition :: t().
-spec get_shape(OperationDefinition, ExecutableDocument) -> Shape when OperationDefinition :: t(), ExecutableDocument :: argo_graphql_executable_document:t(), Shape :: argo_graphql_selection_set:shape().
-spec new(SelectionSet) -> OperationDefinition when SelectionSet :: argo_graphql_selection_set:t(), OperationDefinition :: t().
-spec new(Operation, OptionName, SelectionSet) -> OperationDefinition when Operation :: operation_type(), OptionName :: none | {some, argo_types:name()}, SelectionSet :: argo_graphql_selection_set:t(), OperationDefinition :: t().