summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/AST/Document.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-01-12 07:07:04 +0100
committerEugen Wissner <belka@caraus.de>2020-01-13 08:21:02 +0100
commitd257d05d4e40dc8ca6fa45760c594a880ffcc2ec (patch)
treea1be15da008428daf013a56fd9717bd98bcbdcc0 /src/Language/GraphQL/AST/Document.hs
parentadffa185bb249394ef651392b41b7a20b26031cc (diff)
downloadgraphql-d257d05d4e40dc8ca6fa45760c594a880ffcc2ec.tar.gz
Parse enum and input object type definitions
Diffstat (limited to 'src/Language/GraphQL/AST/Document.hs')
-rw-r--r--src/Language/GraphQL/AST/Document.hs15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/Language/GraphQL/AST/Document.hs b/src/Language/GraphQL/AST/Document.hs
index 74c6ce2..9b156b2 100644
--- a/src/Language/GraphQL/AST/Document.hs
+++ b/src/Language/GraphQL/AST/Document.hs
@@ -12,6 +12,7 @@ module Language.GraphQL.AST.Document
, Description(..)
, Directive(..)
, Document
+ , EnumValueDefinition(..)
, ExecutableDefinition(..)
, FieldDefinition(..)
, FragmentDefinition(..)
@@ -289,7 +290,7 @@ data TypeDefinition
| UnionTypeDefinition Description Name [Directive] (UnionMemberTypes [])
| EnumTypeDefinition Description Name [Directive] [EnumValueDefinition]
| InputObjectTypeDefinition
- Description Name [Directive] InputFieldsDefinitionOpt
+ Description Name [Directive] [InputValueDefinition]
deriving (Eq, Show)
data TypeExtension
@@ -310,7 +311,7 @@ data TypeExtension
Name [Directive] (NonEmpty EnumValueDefinition)
| EnumTypeDirectivesExtension Name (NonEmpty Directive)
| InputObjectTypeInputFieldsDefinitionExtension
- Name [Directive] InputFieldsDefinition
+ Name [Directive] (NonEmpty InputValueDefinition)
| InputObjectTypeDirectivesExtension Name (NonEmpty Directive)
deriving (Eq, Show)
@@ -362,13 +363,3 @@ instance Foldable t => Show (UnionMemberTypes t) where
data EnumValueDefinition = EnumValueDefinition Description Name [Directive]
deriving (Eq, Show)
-
--- ** Input Objects
-
-newtype InputFieldsDefinition
- = InputFieldsDefinition (NonEmpty InputValueDefinition)
- deriving (Eq, Show)
-
-newtype InputFieldsDefinitionOpt
- = InputFieldsDefinitionOpt [InputValueDefinition]
- deriving (Eq, Show)