Maintainer | Brandon Chinn <[email protected]> |
---|---|
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Data.GraphQL.Monad.Class
Description
Defines the MonadGraphQLQuery
type class, which defines how GraphQL queries should be run.
Synopsis
- class Monad m => MonadGraphQLQuery (m :: Type -> Type) where
- runQuerySafe :: forall query (schema :: Schema). (GraphQLQuery query, schema ~ ResultSchema query) => query -> m (GraphQLResult (Object schema))
- runQuery :: forall m query (schema :: Schema). (MonadIO m, MonadGraphQLQuery m, GraphQLQuery query, schema ~ ResultSchema query) => query -> m (Object schema)
Documentation
class Monad m => MonadGraphQLQuery (m :: Type -> Type) where Source #
A type class for monads that can run GraphQL queries.
Methods
runQuerySafe :: forall query (schema :: Schema). (GraphQLQuery query, schema ~ ResultSchema query) => query -> m (GraphQLResult (Object schema)) Source #
Run the given query and return the GraphQLResult
.
Instances
runQuery :: forall m query (schema :: Schema). (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.