From 51c77ba8ad83a05e518d8fd4ef4ce1b354e0f0e7 Mon Sep 17 00:00:00 2001 From: spawnia Date: Thu, 28 Sep 2023 22:40:35 +0200 Subject: [PATCH] Fix codestyle --- src/GlobalId/NodeRegistry.php | 1 - .../Schema/Directives/WhereDirectiveTest.php | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/GlobalId/NodeRegistry.php b/src/GlobalId/NodeRegistry.php index 32c02db24..5665d9c56 100644 --- a/src/GlobalId/NodeRegistry.php +++ b/src/GlobalId/NodeRegistry.php @@ -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."); diff --git a/tests/Integration/Schema/Directives/WhereDirectiveTest.php b/tests/Integration/Schema/Directives/WhereDirectiveTest.php index d7b403743..51b542c24 100644 --- a/tests/Integration/Schema/Directives/WhereDirectiveTest.php +++ b/tests/Integration/Schema/Directives/WhereDirectiveTest.php @@ -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 { @@ -60,7 +60,7 @@ public function testIgnoreNull(): void '; $this - ->graphQL(/** @lang GraphQL */' + ->graphQL(/** @lang GraphQL */ ' { usersIgnoreNull(email: null) { id @@ -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, ]]); } }