graphql-0.8.0.0: Haskell GraphQL implementation

Safe HaskellNone
LanguageHaskell2010

Language.GraphQL.Error

Description

Error handling.

Synopsis

Documentation

parseError :: Applicative f => ParseErrorBundle Text Void -> f Value Source #

Wraps a parse error into a list of errors.

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

A wrapper to pass error messages around.

data Resolution m Source #

Executor context.

Constructors

Resolution 

Fields

addErr :: Monad m => Value -> CollectErrsT m () Source #

Adds an error to the list of errors.

addErrMsg :: Monad m => Text -> CollectErrsT m () Source #

Convenience function for just wrapping an error message.

runCollectErrs :: Monad m => HashMap Name (Type m) -> CollectErrsT m Value -> m Value Source #

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

singleError :: Text -> Value Source #

Constructs a response object containing only the error with the given message.