Skip to content

Commit

Permalink
Fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Sep 28, 2023
1 parent e818123 commit 51c77ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/GlobalId/NodeRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public function resolve(mixed $root, array $args, GraphQLContext $context, Resol
// Loading the type in turn causes the TypeMiddleware to run and thus register the type in the NodeRegistry.
$this->typeRegistry->has($decodedType)
?: throw new Error("[{$decodedType}] is not a type and cannot be resolved.");

// We can not continue without a resolver.
$resolver = $this->nodeResolverFns[$decodedType]
?? throw new Error("[{$decodedType}] is not a registered node and cannot be resolved.");
Expand Down
10 changes: 5 additions & 5 deletions tests/Integration/Schema/Directives/WhereDirectiveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testIgnoreNull(): void
$userWithoutEmail = factory(User::class)->create(['email' => null]);
$userWithEmail = factory(User::class)->create();

$this->schema = /** @lang GraphQL */'
$this->schema = /** @lang GraphQL */ '
scalar DateTime @scalar(class: "Nuwave\\\Lighthouse\\\Schema\\\Types\\\Scalars\\\DateTime")
type User {
Expand All @@ -60,7 +60,7 @@ public function testIgnoreNull(): void
';

$this
->graphQL(/** @lang GraphQL */'
->graphQL(/** @lang GraphQL */ '
{
usersIgnoreNull(email: null) {
id
Expand All @@ -74,12 +74,12 @@ public function testIgnoreNull(): void
->assertGraphQLErrorFree()
->assertJsonCount(2, 'data.usersIgnoreNull')
->assertJsonPath('data.usersIgnoreNull', [
['id' => (string)$userWithoutEmail->id],
['id' => (string)$userWithEmail->id],
['id' => (string) $userWithoutEmail->id],
['id' => (string) $userWithEmail->id],
])
->assertJsonCount(1, 'data.usersExplicitNull')
->assertJsonPath('data.usersExplicitNull', [[
'id' => (string)$userWithoutEmail->id,
'id' => (string) $userWithoutEmail->id,
]]);
}
}

0 comments on commit 51c77ba

Please sign in to comment.