summaryrefslogtreecommitdiff
path: root/Data/GraphQL.hs
diff options
context:
space:
mode:
authorDanny Navarro <j@dannynavarro.net>2017-02-03 21:48:26 -0300
committerDanny Navarro <j@dannynavarro.net>2017-02-10 15:00:22 -0300
commit4ab4660d364cc62c9e23d2cdc85abc3f7dc6dc8d (patch)
tree4ecf1c3b4de54c7f3a5550c4e68ba8724f04273f /Data/GraphQL.hs
parent8b09c8aa76cef5c56811a69aa0fd629186d9f9d9 (diff)
downloadgraphql-4ab4660d364cc62c9e23d2cdc85abc3f7dc6dc8d.tar.gz
Initial implementation of AST.Full -> AST.Core
This focused mainly on fragments.
Diffstat (limited to 'Data/GraphQL.hs')
-rw-r--r--Data/GraphQL.hs4
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