diff options
| author | Eugen Wissner <belka@caraus.de> | 2021-03-14 12:19:30 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2021-03-14 12:19:30 +0100 |
| commit | 4d762d635666a954000be76832303eb3170f4ee2 (patch) | |
| tree | b12e77888d7dc6d7f81b2be4311da56d8e96494d /src/Language/GraphQL/Validate | |
| parent | cbccb9ed0b32167dbb4de16eb5143dd62f9f3159 (diff) | |
| download | graphql-4d762d635666a954000be76832303eb3170f4ee2.tar.gz | |
Add location information to list values
Diffstat (limited to 'src/Language/GraphQL/Validate')
| -rw-r--r-- | src/Language/GraphQL/Validate/Rules.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Language/GraphQL/Validate/Rules.hs b/src/Language/GraphQL/Validate/Rules.hs index 71455d3..ee2fdbe 100644 --- a/src/Language/GraphQL/Validate/Rules.hs +++ b/src/Language/GraphQL/Validate/Rules.hs @@ -1550,7 +1550,7 @@ valuesOfCorrectTypeRule = ValueRule go constGo toConst Full.Null = Just Full.ConstNull toConst (Full.Enum enum) = Just $ Full.ConstEnum enum toConst (Full.List values) = - Just $ Full.ConstList $ catMaybes $ toConst <$> values + Just $ Full.ConstList $ catMaybes $ toConstNode <$> values toConst (Full.Object fields) = Just $ Full.ConstObject $ catMaybes $ constObjectField <$> fields constObjectField Full.ObjectField{..} @@ -1587,7 +1587,7 @@ valuesOfCorrectTypeRule = ValueRule go constGo foldMap (checkObjectField typeFields) valueFields check (In.ListBaseType listType) constValue@Full.Node{ .. } | Full.ConstList listValues <- node = - foldMap (check listType) $ flip Full.Node location <$> listValues + foldMap (check listType) listValues | otherwise = check listType constValue check inputType Full.Node{ .. } = pure $ Error { message = concat |
