graphql- Haskell GraphQL implementation

Safe HaskellNone




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

Wraps a parse error into a list of errors.

type CollectErrsT m = StateT [Value] m Source #

A wrapper to pass error messages around.

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 => 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.

runAppendErrs :: Monad m => CollectErrsT m a -> CollectErrsT m a Source #

Runs the given computation, collecting the errors and appending them to the previous list of errors.

singleError :: Text -> Value Source #

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