diff options
| author | Eugen Wissner <belka@caraus.de> | 2021-03-16 10:08:13 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2021-03-16 10:08:13 +0100 |
| commit | 328e6acdeeaafa27501d6bcc88b5b79704791210 (patch) | |
| tree | f4fbd80337cca885fef63e53e904010955e73f83 /src | |
| parent | 4d762d635666a954000be76832303eb3170f4ee2 (diff) | |
| download | graphql-328e6acdeeaafa27501d6bcc88b5b79704791210.tar.gz | |
Emit list item errors once
Diffstat (limited to 'src')
| -rw-r--r-- | src/Language/GraphQL/Validate/Rules.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Language/GraphQL/Validate/Rules.hs b/src/Language/GraphQL/Validate/Rules.hs index ee2fdbe..905c2a7 100644 --- a/src/Language/GraphQL/Validate/Rules.hs +++ b/src/Language/GraphQL/Validate/Rules.hs @@ -1540,7 +1540,7 @@ valuesOfCorrectTypeRule = ValueRule go constGo go (Just inputType) value | Just constValue <- toConstNode value = lift $ check inputType constValue - go _ _ = lift mempty + go _ _ = lift mempty -- This rule checks only literals. toConstNode Full.Node{..} = flip Full.Node location <$> toConst node toConst (Full.Variable _) = Nothing toConst (Full.Int integer) = Just $ Full.ConstInt integer @@ -1586,8 +1586,8 @@ valuesOfCorrectTypeRule = ValueRule go constGo , Full.ConstObject valueFields <- node = foldMap (checkObjectField typeFields) valueFields check (In.ListBaseType listType) constValue@Full.Node{ .. } - | Full.ConstList listValues <- node = - foldMap (check listType) listValues + -- Skip, lists are checked recursively by the validation traverser. + | Full.ConstList _ <- node = mempty | otherwise = check listType constValue check inputType Full.Node{ .. } = pure $ Error { message = concat |
