graphql-1.2.0.1: Haskell GraphQL implementation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.GraphQL.Error

Description

Error handling.

Synopsis

Documentation

type CollectErrsT m = StateT (Resolution m) m Source #

Deprecated: CollectErrsT was part of the old executor and isn't used anymore

A wrapper to pass error messages around.

data Error Source #

GraphQL error.

Constructors

Error 

Fields

Instances

Instances details
Show Error Source # 
Instance details

Defined in Language.GraphQL.Error

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

Eq Error Source # 
Instance details

Defined in Language.GraphQL.Error

Methods

(==) :: Error -> Error -> Bool #

(/=) :: Error -> Error -> Bool #

data Path Source #

If an error can be associated to a particular field in the GraphQL result, it must contain an entry with the key path that details the path of the response field which experienced the error. This allows clients to identify whether a null result is intentional or caused by a runtime error.

Constructors

Segment Text

Field name.

Index Int

List index if a field returned a list.

Instances

Instances details
Show Path Source # 
Instance details

Defined in Language.GraphQL.Error

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

Eq Path Source # 
Instance details

Defined in Language.GraphQL.Error

Methods

(==) :: Path -> Path -> Bool #

(/=) :: Path -> Path -> Bool #

data Resolution m Source #

Deprecated: Resolution was part of the old executor and isn't used anymore

Executor context.

Constructors

Resolution

Deprecated: Resolution was part of the old executor and isn't used anymore

Fields

data ResolverException Source #

Only exceptions that inherit from ResolverException a cought by the executor.

Constructors

forall e.Exception e => ResolverException e 

data Response a Source #

The server's response describes the result of executing the requested operation if successful, and describes any errors encountered during the request.

Constructors

Response 

Fields

Instances

Instances details
Show a => Show (Response a) Source # 
Instance details

Defined in Language.GraphQL.Error

Methods

showsPrec :: Int -> Response a -> ShowS #

show :: Response a -> String #

showList :: [Response a] -> ShowS #

Eq a => Eq (Response a) Source # 
Instance details

Defined in Language.GraphQL.Error

Methods

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

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

type ResponseEventStream m a = ConduitT () (Response a) m () Source #

Each event in the underlying Source Stream triggers execution of the subscription selection set. The results of the execution generate a Response Stream.

parseError :: (Applicative f, Serialize a) => ParseErrorBundle Text Void -> f (Response a) Source #

Wraps a parse error into a list of errors.

runCollectErrs :: (Monad m, Serialize a) => HashMap Name (Type m) -> CollectErrsT m a -> m (Response a) Source #

Deprecated: runCollectErrs was part of the old executor and isn't used anymore

Runs the given query computation, but collects the errors into an error list, which is then sent back with the data.