Parse schema extensions

This commit is contained in:
2020-01-25 16:37:17 +01:00
parent cb5270b197
commit b4a3c98114
6 changed files with 44 additions and 10 deletions

View File

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