Parse subscriptions

This commit is contained in:
2020-07-11 06:34:10 +02:00
parent 04a58be3f8
commit 840e129c44
7 changed files with 30 additions and 11 deletions

View File

@ -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.