| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.GraphQL
Description
This module provides the functions to parse and execute GraphQL queries.
Synopsis
- graphql :: MonadCatch m => Schema m -> Text -> m (Either (ResponseEventStream m Value) Object)
- graphqlSubs :: MonadCatch m => Schema m -> Maybe Text -> Object -> Text -> m (Either (ResponseEventStream m Value) Object)
Documentation
Arguments
| :: MonadCatch m | |
| => Schema m | Resolvers. |
| -> Text | Text representing a |
| -> m (Either (ResponseEventStream m Value) Object) | Response. |
If the text parses correctly as a GraphQL query the query is
executed using the given Schema.
Arguments
| :: MonadCatch m | |
| => Schema m | Resolvers. |
| -> Maybe Text | Operation name. |
| -> Object | Variable substitution function. |
| -> Text | Text representing a |
| -> m (Either (ResponseEventStream m Value) Object) | Response. |
If the text parses correctly as a GraphQL query the substitution is
applied to the query and the query is then executed using to the given
Schema.