GraphQL icon indicating copy to clipboard operation
GraphQL copied to clipboard

False positive with no unused variable rule

Open jbttn opened this issue 5 years ago • 3 comments

Variables contained within objects are not detected by the "no unused variable" rule:

query Foo($a: String) {
  field(object: { a: $a })
}

"Variable "$a" is never used in operation "Foo"."

jbttn avatar Jul 20 '20 21:07 jbttn

Any update on this, I am also facing similar issue with swift Graphiti Library.

kumararvind avatar Jun 07 '21 11:06 kumararvind

Commented NoUnusedVariablesRule to fix nested variable issue

https://github.com/GraphQLSwift/GraphQL/pull/85

@paulofaria please check and update if it work, I have verified it is working fine.

kumararvind avatar Jun 19 '21 03:06 kumararvind

@paulofaria , Could you please review PR

kumararvind avatar Oct 13 '21 05:10 kumararvind