From d9a2937b55b3f9c55ac42b1968b62888d916dace Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 3 Jan 2020 07:20:48 +0100 Subject: Parse SchemaDefinition --- src/Language/GraphQL/AST/Document.hs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/Language/GraphQL/AST/Document.hs') diff --git a/src/Language/GraphQL/AST/Document.hs b/src/Language/GraphQL/AST/Document.hs index b94b629..30ec897 100644 --- a/src/Language/GraphQL/AST/Document.hs +++ b/src/Language/GraphQL/AST/Document.hs @@ -5,7 +5,7 @@ module Language.GraphQL.AST.Document ( Alias , Argument(..) - , Definition(ExecutableDefinition) + , Definition(ExecutableDefinition, TypeSystemDefinition) , Directive(..) , Document , ExecutableDefinition(..) @@ -15,11 +15,14 @@ module Language.GraphQL.AST.Document , ObjectField(..) , OperationDefinition(..) , OperationType(..) + , OperationTypeDefinition(..) + , OperationTypeDefinitions , Selection(..) , SelectionSet , SelectionSetOpt , Type(..) , TypeCondition + , TypeSystemDefinition(..) , Value(..) , VariableDefinition(..) ) where @@ -228,7 +231,7 @@ data Directive = Directive Name [Argument] deriving (Eq, Show) -- * Type System data TypeSystemDefinition - = SchemaDefinition [Directive] RootOperationTypeDefinitions + = SchemaDefinition [Directive] OperationTypeDefinitions | TypeDefinition TypeDefinition | DirectiveDefinition Description Name ArgumentsDefinition DirectiveLocation @@ -243,14 +246,14 @@ data TypeSystemExtension -- ** Schema -type RootOperationTypeDefinitions = NonEmpty RootOperationTypeDefinition +type OperationTypeDefinitions = NonEmpty OperationTypeDefinition -data RootOperationTypeDefinition - = RootOperationTypeDefinition OperationType NamedType +data OperationTypeDefinition + = OperationTypeDefinition OperationType NamedType deriving (Eq, Show) data SchemaExtension - = SchemaOperationExtension [Directive] RootOperationTypeDefinitions + = SchemaOperationExtension [Directive] OperationTypeDefinitions | SchemaDirectiveExtension (NonEmpty Directive) deriving (Eq, Show) -- cgit v1.2.3