Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides the function to execute a GraphQL
request --
according to a Schema
.
Documentation
execute :: MonadIO m => Schema m -> Subs -> Document -> m Value Source #
Takes a Schema
, a variable substitution function (Subs
), and a
GraphQL
document
. The substitution is applied to the document using
rootFields
, and the Schema'
s resolvers are applied to the resulting fields.
Returns the result of the query against the Schema
wrapped in a data field, or
errors wrapped in an errors field.