The unused variables check seems to be triggered when the variable appears as a value for a field on an input type.
The following yields Variable 'x' is undefined.
query getZuckProfile($x: String) {
search(
pattern: {
name: $x
}
) {
id
}
}
See failing test in https://github.com/typelevel/grackle/pull/new/issue/743