summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-02-01 20:46:35 +0100
committerEugen Wissner <belka@caraus.de>2020-02-01 20:46:35 +0100
commit67bebf853ca5a248358ea1854124a46b70c677cd (patch)
treeb103bf025a1d0f48c2524dd3c2237ff13fd99ec5 /src/Language/GraphQL.hs
parente8b82122c646ba159146c986cc8983d66f790142 (diff)
downloadgraphql-67bebf853ca5a248358ea1854124a46b70c677cd.tar.gz
Replace MonadIO constraint with just Monad
And make the tests use Identity instead of IO.
Diffstat (limited to 'src/Language/GraphQL.hs')
-rw-r--r--src/Language/GraphQL.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Language/GraphQL.hs b/src/Language/GraphQL.hs
index 952f8ac..57c8bf1 100644
--- a/src/Language/GraphQL.hs
+++ b/src/Language/GraphQL.hs
@@ -4,7 +4,6 @@ module Language.GraphQL
, graphqlSubs
) where
-import Control.Monad.IO.Class (MonadIO)
import qualified Data.Aeson as Aeson
import Data.List.NonEmpty (NonEmpty)
import qualified Data.Text as T
@@ -16,7 +15,7 @@ import Text.Megaparsec (parse)
-- | If the text parses correctly as a @GraphQL@ query the query is
-- executed using the given 'Schema.Resolver's.
-graphql :: MonadIO m
+graphql :: Monad m
=> NonEmpty (Schema.Resolver m) -- ^ Resolvers.
-> T.Text -- ^ Text representing a @GraphQL@ request document.
-> m Aeson.Value -- ^ Response.
@@ -25,7 +24,7 @@ graphql = flip graphqlSubs mempty
-- | 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.Resolver's.
-graphqlSubs :: MonadIO m
+graphqlSubs :: Monad m
=> NonEmpty (Schema.Resolver m) -- ^ Resolvers.
-> Schema.Subs -- ^ Variable substitution function.
-> T.Text -- ^ Text representing a @GraphQL@ request document.