graphql-0.8.0.0: Haskell GraphQL implementation

Safe HaskellSafe
LanguageHaskell2010

Language.GraphQL.Type.Out

Description

Output types and values.

This module is intended to be imported qualified, to avoid name clashes with In.

Synopsis

Documentation

data Field m Source #

Output object field definition.

Constructors

Field 

Fields

data InterfaceType m Source #

Interface Type Definition.

When a field can return one of a heterogeneous set of types, a Interface type is used to describe what types are possible, and what fields are in common across all types.

Instances
Eq (InterfaceType a) Source # 
Instance details

Defined in Language.GraphQL.Type.Out

data ObjectType m Source #

Object type definition.

Almost all of the GraphQL types you define will be object types. Object types have a name, but most importantly describe their fields.

Instances
Eq (ObjectType a) Source # 
Instance details

Defined in Language.GraphQL.Type.Out

Methods

(==) :: ObjectType a -> ObjectType a -> Bool #

(/=) :: ObjectType a -> ObjectType a -> Bool #

data Resolver m Source #

Resolves a Field into an Aeson.Object with error information (if an error has occurred). m is an arbitrary monad, usually IO.

Resolving a field can result in a leaf value or an object, which is represented as a list of nested resolvers, used to resolve the fields of that object.

Constructors

Resolver (Field m) (ActionT m Value) 

data Type m Source #

These types may be used as output types as the result of fields.

GraphQL distinguishes between "wrapping" and "named" types. Each wrapping type can wrap other wrapping or named types. Wrapping types are lists and Non-Null types (named types are nullable by default).

Instances
Eq (Type m) Source # 
Instance details

Defined in Language.GraphQL.Type.Out

Methods

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

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

data UnionType m Source #

Union Type Definition.

When a field can return one of a heterogeneous set of types, a Union type is used to describe what types are possible.

Constructors

UnionType Name (Maybe Text) [ObjectType m] 
Instances
Eq (UnionType a) Source # 
Instance details

Defined in Language.GraphQL.Type.Out

Methods

(==) :: UnionType a -> UnionType a -> Bool #

(/=) :: UnionType a -> UnionType a -> Bool #

isNonNullType :: forall m. Type m -> Bool Source #

Checks whether the given output type is a non-null type.

pattern EnumBaseType :: forall m. EnumType -> Type m Source #

Matches either NamedEnumType or NonNullEnumType.

pattern ListBaseType :: forall m. Type m -> Type m Source #

Matches either ListType or NonNullListType.

pattern ObjectBaseType :: forall m. ObjectType m -> Type m Source #

pattern ScalarBaseType :: forall m. ScalarType -> Type m Source #

pattern UnionBaseType :: forall m. UnionType m -> Type m Source #

Matches either NamedUnionType or NonNullUnionType.