Safe Haskell | None |
---|---|
Language | Haskell2010 |
Error handling.
Synopsis
- parseError :: (Applicative f, Serialize a) => ParseErrorBundle Text Void -> f (Response a)
- type CollectErrsT m = StateT (Resolution m) m
- data Error = Error {}
- data Resolution m = Resolution {}
- data ResolverException = Exception e => ResolverException e
- data Response a = Response {}
- type ResponseEventStream m a = ConduitT () (Response a) m ()
- addErr :: Monad m => Error -> CollectErrsT m ()
- addErrMsg :: (Monad m, Serialize a) => Text -> CollectErrsT m a
- runCollectErrs :: (Monad m, Serialize a) => HashMap Name (Type m) -> CollectErrsT m a -> m (Response a)
- singleError :: Serialize a => Text -> Response a
Documentation
parseError :: (Applicative f, Serialize a) => ParseErrorBundle Text Void -> f (Response a) 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.
GraphQL
error.
data Resolution m Source #
Executor context.
data ResolverException Source #
Only exceptions that inherit from ResolverException
a cought by the
executor.
Exception e => ResolverException e |
Instances
Show ResolverException Source # | |
Defined in Language.GraphQL.Error showsPrec :: Int -> ResolverException -> ShowS # show :: ResolverException -> String # showList :: [ResolverException] -> ShowS # | |
Exception ResolverException Source # | |
Defined in Language.GraphQL.Error |
The server's response describes the result of executing the requested operation if successful, and describes any errors encountered during the request.
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.
addErrMsg :: (Monad m, Serialize a) => Text -> CollectErrsT m a Source #
Convenience function for just wrapping an error message.
runCollectErrs :: (Monad m, Serialize a) => HashMap Name (Type m) -> CollectErrsT m a -> m (Response a) Source #
Runs the given query computation, but collects the errors into an error list, which is then sent back with the data.