graphql-1.0.0.0: Haskell GraphQL implementation
Safe HaskellNone
LanguageHaskell2010

Language.GraphQL.Execute

Description

This module provides functions to execute a GraphQL request.

Synopsis

Documentation

execute Source #

Arguments

:: (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.