forked from OSS/graphql
Validate all variables are defined
This commit is contained in:
@ -402,7 +402,7 @@ argument = label "Argument" $ do
|
||||
location <- getLocation
|
||||
name' <- name
|
||||
colon
|
||||
value' <- value
|
||||
value' <- valueNode
|
||||
pure $ Argument name' value' location
|
||||
|
||||
fragmentSpread :: Parser FragmentSpread
|
||||
@ -439,6 +439,12 @@ fragmentName = but (symbol "on") *> name <?> "FragmentName"
|
||||
typeCondition :: Parser TypeCondition
|
||||
typeCondition = symbol "on" *> name <?> "TypeCondition"
|
||||
|
||||
valueNode :: Parser (Node Value)
|
||||
valueNode = do
|
||||
location <- getLocation
|
||||
value' <- value
|
||||
pure $ Node value' location
|
||||
|
||||
value :: Parser Value
|
||||
value = Variable <$> variable
|
||||
<|> Float <$> try float
|
||||
|
Reference in New Issue
Block a user