summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2023-12-21 21:34:37 +0100
committerEugen Wissner <belka@caraus.de>2023-12-21 21:34:37 +0100
commitb1c5a568dd8b6c63d05f08c097f26afd7277f0dd (patch)
treee5656d94ccc6b7d3de6d4876a7c939941df9c2f2 /src/Language/GraphQL
parent5ffe8c72fab01f827f36fd7699c9ce2bfbe21400 (diff)
downloadgraphql-b1c5a568dd8b6c63d05f08c097f26afd7277f0dd.tar.gz
Add a failing test for unused variables bug
Diffstat (limited to 'src/Language/GraphQL')
-rw-r--r--src/Language/GraphQL/Validate/Rules.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Language/GraphQL/Validate/Rules.hs b/src/Language/GraphQL/Validate/Rules.hs
index 8c3156b..4d5a91d 100644
--- a/src/Language/GraphQL/Validate/Rules.hs
+++ b/src/Language/GraphQL/Validate/Rules.hs
@@ -618,6 +618,10 @@ noUndefinedVariablesRule =
, "\"."
]
+-- Used to find the difference between defined and used variables. The first
+-- argument are variables defined in the operation, the second argument are
+-- variables used in the query. It should return the difference between these
+-- 2 sets.
type UsageDifference
= HashMap Full.Name [Full.Location]
-> HashMap Full.Name [Full.Location]