graphql-1.0.2.0: Haskell GraphQL implementation
Safe HaskellNone
LanguageHaskell2010

Language.GraphQL.Type.Schema

Description

This module provides a representation of a GraphQL Schema in addition to functions for defining and manipulating schemas.

Synopsis

Documentation

schema Source #

Arguments

:: forall m. ObjectType m

Query type.

-> Maybe (ObjectType m)

Mutation type.

-> Maybe (ObjectType m)

Subscription type.

-> Directives

Directive definitions.

-> Schema m

Schema.

Schema constructor.

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 using schemaWithTypes instead.

schemaWithTypes Source #

Arguments

:: forall m. Maybe Text

Schema description

-> ObjectType m

Query type.

-> Maybe (ObjectType m)

Mutation type.

-> Maybe (ObjectType m)

Subscription type.

-> [Type m]

Additional types.

-> Directives

Directive definitions.

-> Schema m

Schema.

Constructs a complete schema, including user-defined types not referenced in the schema directly (for example interface implementations).

data Schema m Source #

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.

type Directives = HashMap Name Directive Source #

Directive definitions.

data Directive Source #

Directive definition.

data Type m Source #

These are all of the possible kinds of types.

Instances

Instances details
Eq (Type m) Source # 
Instance details

Defined in Language.GraphQL.Type.Internal

Methods

(==) :: Type m -> Type m -> Bool #

(/=) :: Type m -> Type m -> Bool #

description :: forall m. Schema m -> Maybe Text Source #

Schema description.

query :: forall m. Schema m -> ObjectType m Source #

Schema query type.

mutation :: forall m. Schema m -> Maybe (ObjectType m) Source #

Schema mutation type.

subscription :: forall m. Schema m -> Maybe (ObjectType m) Source #

Schema subscription type.

directives :: forall m. Schema m -> Directives Source #

Schema directive definitions.

types :: forall m. Schema m -> HashMap Name (Type m) Source #

Types referenced by the schema.

implementations :: forall m. Schema m -> HashMap Name [Type m] Source #

Interface implementations.