summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/Execute/Transform.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-09-24 05:47:31 +0200
committerEugen Wissner <belka@caraus.de>2020-09-24 05:47:31 +0200
commit9bfa2aa7e8a72c9cc08743152a96d18312625712 (patch)
tree83455a5432e0430fa6048b13ca2e740cd5017ec4 /src/Language/GraphQL/Execute/Transform.hs
parente9a94147fb5cf6b871268a373fc211cfa50da2fc (diff)
downloadgraphql-9bfa2aa7e8a72c9cc08743152a96d18312625712.tar.gz
Validate input fields have unique names
Diffstat (limited to 'src/Language/GraphQL/Execute/Transform.hs')
-rw-r--r--src/Language/GraphQL/Execute/Transform.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Language/GraphQL/Execute/Transform.hs b/src/Language/GraphQL/Execute/Transform.hs
index 0c4d39c..cf90dbf 100644
--- a/src/Language/GraphQL/Execute/Transform.hs
+++ b/src/Language/GraphQL/Execute/Transform.hs
@@ -177,7 +177,7 @@ constValue (Full.ConstList l) = Type.List $ constValue <$> l
constValue (Full.ConstObject o) =
Type.Object $ HashMap.fromList $ constObjectField <$> o
where
- constObjectField (Full.ObjectField key value') = (key, constValue value')
+ constObjectField (Full.ObjectField key value' _) = (key, constValue value')
-- | Rewrites the original syntax tree into an intermediate representation used
-- for query execution.
@@ -383,7 +383,7 @@ value (Full.List list) = Type.List <$> traverse value list
value (Full.Object object) =
Type.Object . HashMap.fromList <$> traverse objectField object
where
- objectField (Full.ObjectField name value') = (name,) <$> value value'
+ objectField (Full.ObjectField name value' _) = (name,) <$> value value'
input :: forall m. Full.Value -> State (Replacement m) (Maybe Input)
input (Full.Variable name) =
@@ -399,7 +399,7 @@ input (Full.Object object) = do
objectFields <- foldM objectField HashMap.empty object
pure $ pure $ Object objectFields
where
- objectField resultMap (Full.ObjectField name value') =
+ objectField resultMap (Full.ObjectField name value' _) =
inputField resultMap name value'
inputField :: forall m