View Source argo_graphql_object_type_definition (argo v1.0.4)

Summary

Types

-type shape() :: #{argo_types:name() => argo_graphql_type:t(), type := object}.
-type t() ::
    #argo_graphql_object_type_definition{implements :: argo_index_set:t(argo_types:name()),
                                         fields ::
                                             argo_index_map:t(argo_types:name(),
                                                              argo_graphql_field_definition:t())}.

Functions

Link to this function

add_field_definition(ObjectTypeDefinition, FieldDefinition)

View Source
-spec add_field_definition(ObjectTypeDefinition, FieldDefinition) -> ObjectTypeDefinition
                        when
                            ObjectTypeDefinition :: t(),
                            FieldDefinition :: argo_graphql_field_definition:t().
Link to this function

add_interface(ObjectTypeDefinition, InterfaceName)

View Source
-spec add_interface(ObjectTypeDefinition, InterfaceName) -> ObjectTypeDefinition
                 when ObjectTypeDefinition :: t(), InterfaceName :: argo_types:name().
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

from_language(LanguageObjectTypeDefinition)

View Source
-spec from_language(LanguageObjectTypeDefinition) -> ObjectTypeDefinition
                 when
                     LanguageObjectTypeDefinition ::
                         argo_graphql_language_object_type_definition:t(),
                     ObjectTypeDefinition :: t().
Link to this function

get_implements_interfaces(ObjectTypeDefinition, ServiceDocument)

View Source
-spec get_implements_interfaces(ObjectTypeDefinition, ServiceDocument) -> ImplementsInterfaces
                             when
                                 ObjectTypeDefinition :: t(),
                                 ServiceDocument :: argo_graphql_service_document:t(),
                                 ImplementsInterfaces :: [argo_types:name()].
Link to this function

get_shape(ObjectTypeDefinition)

View Source
-spec get_shape(ObjectTypeDefinition) -> ObjectShape
             when ObjectTypeDefinition :: t(), ObjectShape :: shape().
Link to this function

get_shape(ObjectTypeDefinition, ServiceDocument)

View Source
-spec get_shape(ObjectTypeDefinition, ServiceDocument) -> ObjectShape
             when
                 ObjectTypeDefinition :: t(),
                 ServiceDocument :: argo_graphql_service_document:t(),
                 ObjectShape :: shape().
Link to this function

is_ambiguous(Definition)

View Source
-spec is_ambiguous(Definition) -> boolean() when Definition :: t().
Schema extensions without additional operation type definitions must not be followed by a { (such as a query shorthand) to avoid parsing ambiguity. The same limitation applies to the type definitions and extensions below.
-spec new() -> ObjectTypeDefinition when ObjectTypeDefinition :: t().