diff options
| author | Eugen Wissner <belka@caraus.de> | 2020-01-03 07:20:48 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2020-01-13 08:18:30 +0100 |
| commit | d9a2937b55b3f9c55ac42b1968b62888d916dace (patch) | |
| tree | 1965dcf23a4853449c18d6daf3f108b97f700418 /src/Language/GraphQL/AST/Document.hs | |
| parent | f4f076fa59ec393fa0e03595deb82d94c01142d3 (diff) | |
| download | graphql-d9a2937b55b3f9c55ac42b1968b62888d916dace.tar.gz | |
Parse SchemaDefinition
Diffstat (limited to 'src/Language/GraphQL/AST/Document.hs')
| -rw-r--r-- | src/Language/GraphQL/AST/Document.hs | 15 |
1 files changed, 9 insertions, 6 deletions
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) |
