graphqexl v0.1.0-alpha-rc.19 Graphqexl.Schema
Structured representation of a GraphQL schema, either built dynamically or parsed from a JSON document or GQL string.
Link to this section Summary
Functions
Builds an executable schema containing the schema definition as well as resolver map and context factory.
Parses a json map into a Graphqexl.Schema.t/0
.
Check whether a field is defined on the given schema.
Registers the given component on the given schema.
Link to this section Types
Link to this type
component()
component() :: Graphqexl.Schema.TEnum.t() | Graphqexl.Schema.Interface.t() | Graphqexl.Schema.Mutation.t() | Graphqexl.Schema.Query.t() | Graphqexl.Schema.Subscription.t() | Graphqexl.Schema.Type.t() | Graphqexl.Schema.Union.t()
Link to this type
t()
t() :: %Graphqexl.Schema{ context: ({Graphqexl.Schema.Query.t(), Map.t()} -> Map.t()), enums: [Graphqexl.Schema.TEnum.t()], interfaces: [Graphqexl.Schema.Interface.t()], mutations: [Graphqexl.Schema.Mutation.t()], queries: [Queries.t()], resolvers: Map.t(), str: gql(), subscriptions: [Graphqexl.Schema.Subscription.t()], types: [Graphqexl.Schema.Type.t()], unions: [Graphqexl.Schema.Union.t()] }
Link to this section Functions
Link to this function
executable(gql_str, resolvers, context \\ nil)
(since 0.1.0)executable(gql(), Map.t(), Map.t() | nil) :: Graphqexl.Schema.t()
Builds an executable schema containing the schema definition as well as resolver map and context factory.
Returns: Graphqexl.Schema.t/0
Parses a json map into a Graphqexl.Schema.t/0
.
Returns Graphqexl.Schema.t/0
Link to this function
has_field?(schema, field)
(since 0.1.0)has_field?(Graphqexl.Schema.t(), atom()) :: boolean()
Check whether a field is defined on the given schema.
Returns: boolean/0
Link to this function
register(schema, component)
(since 0.1.0)register(GraphqexlSchema.t(), component()) :: Graphqexl.Schema.t()
Registers the given component on the given schema.
Returns Graphqexl.Schema.t/0