public function testVariableInFragmentNotDefinedByOperation()
{
$this->expectFailsRule(new NoUndefinedVariables(), '
query Foo($a: String, $b: String) {
...FragA
}
fragment FragA on Type {
field(a: $a) {
...FragB
}
}
fragment FragB on Type {
field(b: $b) {
...FragC
}
}
fragment FragC on Type {
field(c: $c)
}
', [$this->undefVar('c', 16, 18, 'Foo', 2, 7)]);
}