diff options
| author | Eugen Wissner <belka@caraus.de> | 2020-10-04 18:51:21 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2020-10-05 14:51:21 +0200 |
| commit | a91bc7f2d218ea2df308d3968587b60351625150 (patch) | |
| tree | 3c3170437b0c903e2c63540c028c1aaa4ff35c17 /src/Language/GraphQL/AST/Parser.hs | |
| parent | d5f518fe827d3d279d6c37740820f296689539e4 (diff) | |
| download | graphql-a91bc7f2d218ea2df308d3968587b60351625150.tar.gz | |
Validate required input fields
Diffstat (limited to 'src/Language/GraphQL/AST/Parser.hs')
| -rw-r--r-- | src/Language/GraphQL/AST/Parser.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Language/GraphQL/AST/Parser.hs b/src/Language/GraphQL/AST/Parser.hs index 2695e6f..46c8fa3 100644 --- a/src/Language/GraphQL/AST/Parser.hs +++ b/src/Language/GraphQL/AST/Parser.hs @@ -461,7 +461,7 @@ value = Full.Variable <$> variable <|> Full.String <$> stringValue <|> Full.Enum <$> try enumValue <|> Full.List <$> brackets (some value) - <|> Full.Object <$> braces (some $ objectField value) + <|> Full.Object <$> braces (some $ objectField $ valueNode value) <?> "Value" constValue :: Parser Full.ConstValue @@ -472,7 +472,7 @@ constValue = Full.ConstFloat <$> try float <|> Full.ConstString <$> stringValue <|> Full.ConstEnum <$> try enumValue <|> Full.ConstList <$> brackets (some constValue) - <|> Full.ConstObject <$> braces (some $ objectField constValue) + <|> Full.ConstObject <$> braces (some $ objectField $ valueNode constValue) <?> "Value" booleanValue :: Parser Bool @@ -493,7 +493,7 @@ stringValue = blockString <|> string <?> "StringValue" nullValue :: Parser Text nullValue = symbol "null" <?> "NullValue" -objectField :: Parser a -> Parser (Full.ObjectField a) +objectField :: forall a. Parser (Full.Node a) -> Parser (Full.ObjectField a) objectField valueParser = label "ObjectField" $ do location <- getLocation fieldName <- name |
