public function testNullsTheTopLevelIfSyncNonNullableFieldReturnsNull()
{
// nulls the top level if sync non-nullable field returns null
$doc = '
query Q { nonNullSync }
';
$expected = ['errors' => [FormattedError::create('Cannot return null for non-nullable field DataType.nonNullSync.', [new SourceLocation(2, 17)])]];
$this->assertArraySubset($expected, Executor::execute($this->schema, Parser::parse($doc), $this->nullingData)->toArray());
}