forked from OSS/graphql
Validate all variables are defined
This commit is contained in:
@ -24,6 +24,7 @@ module Language.GraphQL.AST.Document
|
||||
, Location(..)
|
||||
, Name
|
||||
, NamedType
|
||||
, Node(..)
|
||||
, NonNullType(..)
|
||||
, ObjectField(..)
|
||||
, OperationDefinition(..)
|
||||
@ -70,6 +71,9 @@ instance Ord Location where
|
||||
| thisLine > thatLine = GT
|
||||
| otherwise = compare thisColumn thatColumn
|
||||
|
||||
-- | Contains some tree node with a location.
|
||||
data Node a = Node a Location deriving (Eq, Show)
|
||||
|
||||
-- ** Document
|
||||
|
||||
-- | GraphQL document.
|
||||
@ -190,7 +194,7 @@ data FragmentSpread = FragmentSpread Name [Directive] Location
|
||||
-- @
|
||||
--
|
||||
-- Here "id" is an argument for the field "user" and its value is 4.
|
||||
data Argument = Argument Name Value Location deriving (Eq,Show)
|
||||
data Argument = Argument Name (Node Value) Location deriving (Eq, Show)
|
||||
|
||||
-- ** Fragments
|
||||
|
||||
|
Reference in New Issue
Block a user