Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides a representation of a GraphQL
Schema in addition to
functions for defining and manipulating schemas.
Synopsis
- schema :: forall m. ObjectType m -> Maybe (ObjectType m) -> Maybe (ObjectType m) -> Directives -> Schema m
- data Schema m
- type Directives = HashMap Name Directive
- data Directive = Directive (Maybe Text) [DirectiveLocation] Arguments
- data Type m
- query :: forall m. Schema m -> ObjectType m
- mutation :: forall m. Schema m -> Maybe (ObjectType m)
- subscription :: forall m. Schema m -> Maybe (ObjectType m)
- directives :: forall m. Schema m -> Directives
- types :: forall m. Schema m -> HashMap Name (Type m)
- implementations :: forall m. Schema m -> HashMap Name [Type m]
Documentation
:: forall m. ObjectType m | Query type. |
-> Maybe (ObjectType m) | Mutation type. |
-> Maybe (ObjectType m) | Subscription type. |
-> Directives | Directive definitions. |
-> Schema m | Schema. |
Schema constructor.
A Schema is created by supplying the root types of each type of operation, query and mutation (optional). A schema definition is then supplied to the validator and executor.
Note: When the schema is constructed, by default only the types that are reachable by traversing the root types are included, other types must be explicitly referenced.
These are all of the possible kinds of types.
query :: forall m. Schema m -> ObjectType m Source #
Schema query type.
subscription :: forall m. Schema m -> Maybe (ObjectType m) Source #
Schema subscription type.
directives :: forall m. Schema m -> Directives Source #
Schema directive definitions.