diff options
| author | Danny Navarro <j@dannynavarro.net> | 2017-02-26 16:07:00 -0300 |
|---|---|---|
| committer | Danny Navarro <j@dannynavarro.net> | 2017-02-28 16:07:00 -0300 |
| commit | 1b8fca3658215c69402e2bc0f0c46d28e46d70e2 (patch) | |
| tree | e3d2c3760c6ec720c3a1a60b3ca7cacc74f2e331 /Data/GraphQL.hs | |
| parent | 642eab312f7b18619ff24e07a8863591f13ba07f (diff) | |
| parent | bada28ce24dcd0fcae95ebd7dd9a9ebb106e3842 (diff) | |
| download | graphql-1b8fca3658215c69402e2bc0f0c46d28e46d70e2.tar.gz | |
Merge branch 'core'
This introduces a distinction between a Full and a Core AST. Fragments and
variables are replaced when transforming from Full to Core.
Diffstat (limited to 'Data/GraphQL.hs')
| -rw-r--r-- | Data/GraphQL.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Data/GraphQL.hs b/Data/GraphQL.hs index dd411e5..dfe9362 100644 --- a/Data/GraphQL.hs +++ b/Data/GraphQL.hs @@ -19,7 +19,7 @@ import Data.GraphQL.Error -- executed according to the given 'Schema'. -- -- Returns the response as an @Aeson.@'Aeson.Value'. -graphql :: Alternative m => Schema m -> Text -> m Aeson.Value +graphql :: (Alternative m, Monad m) => Schema m -> Text -> m Aeson.Value graphql = flip graphqlSubs $ const Nothing -- | Takes a 'Schema', a variable substitution function and text @@ -28,7 +28,7 @@ graphql = flip graphqlSubs $ const Nothing -- query and the query is then executed according to the given 'Schema'. -- -- Returns the response as an @Aeson.@'Aeson.Value'. -graphqlSubs :: Alternative m => Schema m -> Subs -> Text -> m Aeson.Value +graphqlSubs :: (Alternative m, Monad m) => Schema m -> Subs -> Text -> m Aeson.Value graphqlSubs schema f = either parseError (execute schema f) . Attoparsec.parseOnly document |
