public function testDisallowsDifferingDeepReturnTypesDespiteNoOverlap()
{
$this->expectFailsRuleWithSchema($this->getTestSchema(), new OverlappingFieldsCanBeMerged(), '
{
someBox {
... on IntBox {
box: stringBox {
scalar
}
}
... on StringBox {
box: intBox {
scalar
}
}
}
}
', [FormattedError::create(OverlappingFieldsCanBeMerged::fieldsConflictMessage('box', [['scalar', 'they return conflicting types String and Int']]), [new SourceLocation(5, 15), new SourceLocation(6, 17), new SourceLocation(10, 15), new SourceLocation(11, 17)])]);
}