graphql-0.4.0.0: Haskell GraphQL implementation

Safe HaskellNone
LanguageHaskell2010

Language.GraphQL.Execute

Description

This module provides the function to execute a GraphQL request -- according to a Schema.

Synopsis

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.