diff --git a/tests/Integration/Execution/MutationExecutor/BelongsToTest.php b/tests/Integration/Execution/MutationExecutor/BelongsToTest.php index a7fecddb25..bc4e29a672 100644 --- a/tests/Integration/Execution/MutationExecutor/BelongsToTest.php +++ b/tests/Integration/Execution/MutationExecutor/BelongsToTest.php @@ -112,6 +112,25 @@ public function testCreateAndConnectWithBelongsTo(): void ]); } + public function testConnectNonExisting(): void + { + $this + ->graphQL(/** @lang GraphQL */ ' + mutation { + createTask(input: { + name: "foo" + user: { + connect: 1 + } + }) { + id + } + } + ') + ->dump() + ->assertGraphQLErrorMessage('Can not connect non-existing User 1'); + } + public function testBelongsToExplicitNullHasNoEffect(): void { $this->graphQL(/** @lang GraphQL */ '