summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/Execute.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-07-11 06:34:10 +0200
committerEugen Wissner <belka@caraus.de>2020-07-11 06:34:10 +0200
commit840e129c4496b4e8145480d2b3c3cb34f505702e (patch)
tree0b79c0f8045d93505d8285ebff327000a6926168 /src/Language/GraphQL/Execute.hs
parent04a58be3f86ced396eed26f90643e7c88e7f2b4d (diff)
downloadgraphql-840e129c4496b4e8145480d2b3c3cb34f505702e.tar.gz
Parse subscriptions
Diffstat (limited to 'src/Language/GraphQL/Execute.hs')
-rw-r--r--src/Language/GraphQL/Execute.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Language/GraphQL/Execute.hs b/src/Language/GraphQL/Execute.hs
index ff1078c..471cd00 100644
--- a/src/Language/GraphQL/Execute.hs
+++ b/src/Language/GraphQL/Execute.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE OverloadedStrings #-}
+
-- | This module provides functions to execute a @GraphQL@ request.
module Language.GraphQL.Execute
( execute
@@ -42,6 +44,8 @@ executeRequest (Transform.Document types' rootObjectType operation)
executeOperation types' rootObjectType fields
| (Transform.Mutation _ fields) <- operation =
executeOperation types' rootObjectType fields
+ | otherwise =
+ pure $ singleError "This service does not support subscriptions."
-- This is actually executeMutation, but we don't distinguish between queries
-- and mutations yet.