Maintainer | Brandon Chinn <brandon@leapyear.io> |
---|---|
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Defines the MonadGraphQLQuery
type class, which defines how GraphQL queries should be run.
Synopsis
- class Monad m => MonadGraphQLQuery m where
- runQuerySafe :: (GraphQLQuery query, schema ~ ResultSchema query) => query -> m (GraphQLResult (Object schema))
- runQuery :: (MonadIO m, MonadGraphQLQuery m, GraphQLQuery query, schema ~ ResultSchema query) => query -> m (Object schema)
Documentation
class Monad m => MonadGraphQLQuery m where Source #
A type class for monads that can run GraphQL queries.
runQuerySafe :: (GraphQLQuery query, schema ~ ResultSchema query) => query -> m (GraphQLResult (Object schema)) Source #
Run the given query and return the GraphQLResult
.
Instances
runQuery :: (MonadIO m, MonadGraphQLQuery m, GraphQLQuery query, schema ~ ResultSchema query) => query -> m (Object schema) Source #
Run the given query and returns the result, erroring if the query returned errors.