Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides functions to execute a GraphQL
request.
Synopsis
- execute :: (MonadCatch m, VariableValue a, Serialize b) => Schema m -> Maybe Text -> HashMap Name a -> Document -> m (Either (ResponseEventStream m b) (Response b))
- module Language.GraphQL.Execute.Coerce
Documentation
:: (MonadCatch m, VariableValue a, Serialize b) | |
=> Schema m | Resolvers. |
-> Maybe Text | Operation name. |
-> HashMap Name a | Variable substitution function. |
-> Document | |
-> m (Either (ResponseEventStream m b) (Response b)) |
The substitution is applied to the document, and the resolvers are applied to the resulting fields. The operation name can be used if the document defines multiple root operations.
Returns the result of the query against the schema wrapped in a data field, or errors wrapped in an errors field.