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

@ -334,7 +334,8 @@ operationDefinition = SelectionSet <$> selectionSet
operationType :: Parser OperationType
operationType = Query <$ symbol "query"
<|> Mutation <$ symbol "mutation"
-- <?> Keep default error message
<|> Subscription <$ symbol "subscription"
<?> "OperationType"
selectionSet :: Parser SelectionSet
selectionSet = braces (NonEmpty.some selection) <?> "SelectionSet"