graphql-0.4.0.0: Haskell GraphQL implementation

Safe HaskellNone
LanguageHaskell2010

Language.GraphQL

Description

This module provides the functions to parse and execute GraphQL queries.

Synopsis

Documentation

graphql :: MonadIO m => Schema m -> Text -> m Value Source #

Takes a Schema and text representing a GraphQL request document. If the text parses correctly as a GraphQL query the query is executed according to the given Schema.

Returns the response as an Aeson.Value.

graphqlSubs :: MonadIO m => Schema m -> Subs -> Text -> m Value Source #

Takes a Schema, a variable substitution function and text representing a GraphQL request document. If the text parses correctly as a GraphQL query the substitution is applied to the query and the query is then executed according to the given Schema.

Returns the response as an Aeson.Value.