summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/AST/Document.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-01-25 16:37:17 +0100
committerEugen Wissner <belka@caraus.de>2020-01-25 16:45:39 +0100
commitb4a3c9811447ab1c7704e9667ff0103771b7587c (patch)
tree377262ed29cb8e966e24f6ec020d6ff266937cc6 /src/Language/GraphQL/AST/Document.hs
parentcb5270b1974f80d34b0178a90198f96d96f57522 (diff)
downloadgraphql-b4a3c9811447ab1c7704e9667ff0103771b7587c.tar.gz
Parse schema extensions
Diffstat (limited to 'src/Language/GraphQL/AST/Document.hs')
-rw-r--r--src/Language/GraphQL/AST/Document.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Language/GraphQL/AST/Document.hs b/src/Language/GraphQL/AST/Document.hs
index e3fe78c..6ed5f50 100644
--- a/src/Language/GraphQL/AST/Document.hs
+++ b/src/Language/GraphQL/AST/Document.hs
@@ -25,7 +25,6 @@ module Language.GraphQL.AST.Document
, OperationDefinition(..)
, OperationType(..)
, OperationTypeDefinition(..)
- , OperationTypeDefinitions
, SchemaExtension(..)
, Selection(..)
, SelectionSet
@@ -247,7 +246,7 @@ data Directive = Directive Name [Argument] deriving (Eq, Show)
-- * Type System
data TypeSystemDefinition
- = SchemaDefinition [Directive] OperationTypeDefinitions
+ = SchemaDefinition [Directive] (NonEmpty OperationTypeDefinition)
| TypeDefinition TypeDefinition
| DirectiveDefinition
Description Name ArgumentsDefinition (NonEmpty DirectiveLocation)
@@ -262,14 +261,12 @@ data TypeSystemExtension
-- ** Schema
-type OperationTypeDefinitions = NonEmpty OperationTypeDefinition
-
data OperationTypeDefinition
= OperationTypeDefinition OperationType NamedType
deriving (Eq, Show)
data SchemaExtension
- = SchemaOperationExtension [Directive] OperationTypeDefinitions
+ = SchemaOperationExtension [Directive] (NonEmpty OperationTypeDefinition)
| SchemaDirectiveExtension (NonEmpty Directive)
deriving (Eq, Show)