Skip to content

Commit cf4d550

Browse files
author
Jeremiah VALERIE
committed
Fix allow lazy type loader to return null
see webonyx/graphql-php#1038
1 parent 2cf6f48 commit cf4d550

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/Functional/MultipleSchema/MultipleSchemaTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,11 @@ public function testInternalSchema(): void
7474
$this->assertGraphQL($query, $expectedData, null, [], 'internal');
7575
}
7676

77-
public function testUnknownTypeShouldNotInfinityLoop(): void
77+
public function testUnknownTypeShouldReturnNull(): void
7878
{
7979
// @phpstan-ignore-next-line
8080
$schema = $this->getContainer()->get('overblog_graphql.request_executor')->getSchema('public');
81-
$this->expectException(InvariantViolation::class);
82-
$this->expectExceptionMessage('Type loader is expected to return a callable or valid type "unknown", but it returned null');
83-
$schema->getType('unknown');
81+
$this->assertNull($schema->getType('unknown'));
8482
}
8583

8684
private function assertSchemaQueryTypeName(string $typeName): void

0 commit comments

Comments
 (0)