View Source argo_typer (argo v1.0.6)

Summary

Types

Link to this type

collect_field_wire_types/0

View Source
-type collect_field_wire_types() ::
    #collect_field_wire_types{typer :: t(),
                              selection_type_definition :: argo_graphql_type_definition:t(),
                              selection_set :: argo_graphql_selection_set:t(),
                              exact_selections :: sets:set(argo_types:name()),
                              record_fields :: queue:queue(argo_field_wire_type:t())}.
-type field_map() ::
    [#field_map{node :: selected_field_node(), definition :: argo_graphql_field_definition:t()}].
-type options() :: #{resolver => argo_typer_resolver:t()}.
-type selected_field_node() ::
    #selected_field_node{by :: argo_graphql_selection_set:selection(),
                         field :: argo_graphql_field:t()}.
-type t() ::
    #argo_typer{service_document :: argo_graphql_service_document:t(),
                executable_document :: argo_graphql_executable_document:t(),
                options :: argo_typer:options()}.

Functions

Link to this function

collect_field_wire_types(Typer, SelectionTypeDefinition, SelectionSet)

View Source
-spec collect_field_wire_types(Typer, SelectionTypeDefinition, SelectionSet) -> {Typer, WireType}
                            when
                                Typer :: t(),
                                SelectionTypeDefinition :: argo_graphql_type_definition:t(),
                                SelectionSet :: argo_graphql_selection_set:t(),
                                WireType :: argo_wire_type:t().
Link to this function

collect_fields_static(Typer, SelectionSet)

View Source
-spec collect_fields_static(Typer, SelectionSet) -> {Typer, GroupedFields, VisitedFragments}
                         when
                             Typer :: t(),
                             SelectionSet :: argo_graphql_selection_set:t(),
                             VisitedFragments :: sets:set(FragmentName),
                             FragmentName :: argo_types:name(),
                             GroupedFields :: argo_index_map:t(ResponseKey, SelectedFieldNodeList),
                             SelectedFieldNodeList :: [SelectedFieldNode],
                             ResponseKey :: argo_types:name(),
                             SelectedFieldNode :: selected_field_node().
Link to this function

derive_wire_type(ServiceDocument, ExecutableDocument, OptionOperationName)

View Source
-spec derive_wire_type(ServiceDocument, ExecutableDocument, OptionOperationName) ->
                    {OptionOperationName, WireType}
                    when
                        ServiceDocument :: argo_graphql_service_document:t(),
                        ExecutableDocument :: argo_graphql_executable_document:t(),
                        OptionOperationName :: none | {some, OperationName},
                        OperationName :: argo_types:name(),
                        WireType :: argo_wire_type:t().
Link to this function

derive_wire_type(ServiceDocument, ExecutableDocument, OptionOperationName, Options)

View Source
-spec derive_wire_type(ServiceDocument, ExecutableDocument, OptionOperationName, Options) ->
                    {OptionOperationName, WireType}
                    when
                        ServiceDocument :: argo_graphql_service_document:t(),
                        ExecutableDocument :: argo_graphql_executable_document:t(),
                        OptionOperationName :: none | {some, OperationName},
                        Options :: options(),
                        OperationName :: argo_types:name(),
                        WireType :: argo_wire_type:t().
-spec format_error(dynamic(), dynamic()) -> dynamic().
Link to this function

get_field_definition(Typer, TypeDefinition, FieldName)

View Source
-spec get_field_definition(Typer, TypeDefinition, FieldName) -> FieldDefinition
                        when
                            Typer :: t(),
                            TypeDefinition :: argo_graphql_type_definition:t(),
                            FieldName :: argo_types:name(),
                            FieldDefinition :: argo_graphql_field_definition:t().
Link to this function

get_field_definition(Typer, SelectedTypeDefinition, FieldName, OptionTypeCondition)

View Source
-spec get_field_definition(Typer, SelectedTypeDefinition, FieldName, OptionTypeCondition) ->
                        FieldDefinition
                        when
                            Typer :: t(),
                            SelectedTypeDefinition :: argo_graphql_type_definition:t(),
                            FieldName :: argo_types:name(),
                            OptionTypeCondition :: argo_types:option(TypeCondition),
                            TypeCondition :: argo_types:name(),
                            FieldDefinition :: argo_graphql_field_definition:t().
Link to this function

get_fragment_definition(Typer, FragmentName)

View Source
-spec get_fragment_definition(Typer, FragmentName) -> FragmentDefinition
                           when
                               Typer :: t(),
                               FragmentName :: argo_types:name(),
                               FragmentDefinition :: argo_graphql_fragment_definition:t().
Link to this function

get_operation_definition(Typer, OptionOperationName)

View Source
-spec get_operation_definition(Typer, OptionOperationName) -> {OptionOperationName, OperationDefinition}
                            when
                                Typer :: t(),
                                OptionOperationName :: argo_types:option(OperationName),
                                OperationName :: argo_types:name(),
                                OperationDefinition :: argo_graphql_operation_definition:t().
Link to this function

get_operation_type_definition(Typer, OperationDefinition)

View Source
-spec get_operation_type_definition(Typer, OperationDefinition) -> DataTypeDefinition
                                 when
                                     Typer :: t(),
                                     OperationDefinition :: argo_graphql_operation_definition:t(),
                                     DataTypeDefinition :: argo_graphql_type_definition:t().
Link to this function

get_type_definition(Typer, TypeName)

View Source
-spec get_type_definition(Typer, TypeName) -> TypeDefinition
                       when
                           Typer :: t(),
                           TypeName :: argo_types:name(),
                           TypeDefinition :: argo_graphql_type_definition:t().
Link to this function

graphql_type_to_wire_type(Typer, Type)

View Source
-spec graphql_type_to_wire_type(Typer | ServiceDocument, Type) -> WireType
                             when
                                 Typer :: t(),
                                 ServiceDocument :: argo_graphql_service_document:t(),
                                 Type :: argo_graphql_type:t(),
                                 WireType :: argo_wire_type:t().
Link to this function

graphql_type_to_wire_type(ServiceDocument, Type, Options)

View Source
-spec graphql_type_to_wire_type(ServiceDocument, Type, Options) -> WireType
                             when
                                 ServiceDocument :: argo_graphql_service_document:t(),
                                 Type :: argo_graphql_type:t(),
                                 Options :: options(),
                                 WireType :: argo_wire_type:t().
Link to this function

new(ServiceDocument, ExecutableDocument, Options)

View Source
-spec new(ServiceDocument, ExecutableDocument, Options) -> Typer
       when
           ServiceDocument :: argo_graphql_service_document:t(),
           ExecutableDocument :: argo_graphql_executable_document:t(),
           Options :: options(),
           Typer :: t().
Link to this function

path_to_wire_path(WireType, Path)

View Source
-spec path_to_wire_path(WireType, Path) -> WirePath
                     when
                         WireType :: argo_wire_type:t(),
                         Path :: argo_path_value:segment_list(),
                         WirePath :: argo_wire_path:segment_list().
Link to this function

wire_path_to_path(WireType, WirePath)

View Source
-spec wire_path_to_path(WireType, WirePath) -> Path
                     when
                         WireType :: argo_wire_type:t(),
                         WirePath :: argo_wire_path:segment_list(),
                         Path :: argo_path_value:segment_list().