Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/Database/AuthorizeArgsTests/AuthorizeArgsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public function testAuthorizeArgs(): void
GRAPHQL;

// All relevant test assertions are in \Rebing\GraphQL\Tests\Database\AuthorizeArgsTests\TestAuthorizationArgsQuery::authorize
$this->httpGraphql($graphql);
$this->httpGraphql($graphql, [
'expectErrors' => true,
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testUniquePassRulePass(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql, [
$result = $this->httpGraphql($graphql, [
'expectErrors' => true,
'variables' => [
'arg_unique_rule_pass' => 'another_name',
Expand Down Expand Up @@ -75,7 +75,7 @@ public function testUniqueFailRulePass(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql, [
$result = $this->httpGraphql($graphql, [
'expectErrors' => true,
'variables' => [
'arg_unique_rule_pass' => 'name_unique',
Expand Down Expand Up @@ -131,7 +131,7 @@ public function testUniquePassRuleFail(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql, [
$result = $this->httpGraphql($graphql, [
'expectErrors' => true,
'variables' => [
'arg_unique_rule_fail' => 'another_name',
Expand Down Expand Up @@ -181,7 +181,7 @@ public function testUniqueFailRuleFail(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql, [
$result = $this->httpGraphql($graphql, [
'expectErrors' => true,
'variables' => [
'arg_unique_rule_fail' => 'name_unique',
Expand Down Expand Up @@ -238,7 +238,7 @@ public function testErrorExtension(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql, [
$result = $this->httpGraphql($graphql, [
'expectErrors' => true,
'variables' => [
'arg_unique_rule_fail' => 'name_unique',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function testAlwaysSingleHasManyRelationField(): void

$this->sqlCounterReset();

$result = $this->graphql($query, [
$result = $this->httpGraphql($query, [
'expectErrors' => true,
]);

Expand Down Expand Up @@ -154,7 +154,7 @@ public function testAlwaysSingleMorphRelationField(): void

$this->sqlCounterReset();

$result = $this->graphql($query, [
$result = $this->httpGraphql($query, [
'expectErrors' => true,
]);

Expand Down
8 changes: 4 additions & 4 deletions tests/Database/SelectFields/AlwaysTests/AlwaysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function testAlwaysSingleField(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -117,7 +117,7 @@ public function testAlwaysSingleMultipleFieldInString(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -174,7 +174,7 @@ public function testAlwaysSingleMultipleFieldInArray(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -231,7 +231,7 @@ public function testAlwaysSameFieldTwice(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down
2 changes: 1 addition & 1 deletion tests/Database/SelectFields/ArrayTests/ArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function testArrayFieldRetrieved(): void
}
GRAQPHQL;

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$expectedResult = [
'data' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function testComputedProperty(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down
4 changes: 2 additions & 2 deletions tests/Database/SelectFields/DepthTests/DepthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function testDefaultDepthExceeded(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql, [
$result = $this->httpGraphql($graphql, [
'expectErrors' => true,
]);

Expand Down Expand Up @@ -112,7 +112,7 @@ public function testDefaultDepthAdjusted(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down
12 changes: 6 additions & 6 deletions tests/Database/SelectFields/InterfaceTests/InterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testGeneratedSqlQuery(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -102,7 +102,7 @@ public function testGeneratedRelationSqlQuery(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -166,7 +166,7 @@ public function testGeneratedInterfaceFieldSqlQuery(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -237,7 +237,7 @@ public function testGeneratedInterfaceFieldInlineFragmentsAndAlias(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -316,7 +316,7 @@ public function testGeneratedInterfaceFieldWithRelationSqlQuery(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -422,7 +422,7 @@ public function testGeneratedInterfaceFieldWithRelationAndCustomQueryOnInterface

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function testMorphRelationship(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function testQueryNoSelectFields(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -213,7 +213,7 @@ public function testQuerySelect(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -355,7 +355,7 @@ public function testQueryWith(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -493,7 +493,7 @@ public function testQuerySelectAndWith(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -646,7 +646,7 @@ public function testQuerySelectAndWithAndSubArgs(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -775,7 +775,7 @@ public function testQuerySelectAndWithAndNestedSubArgs(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -859,7 +859,7 @@ public function testRelationshipAlias(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function testPagination(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function testPrimaryKeyRetrievedWhenSelectingRelations(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -114,7 +114,7 @@ public function testPrimaryKeyRetrievedWhenSelectingRelationsAndResultPaginated(

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function testSimplePagination(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -131,7 +131,7 @@ public function testSimplePaginationHasNoMorePage(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down Expand Up @@ -186,7 +186,7 @@ public function testSimplePaginationReturnEmptyList(): void

$this->sqlCounterReset();

$result = $this->graphql($query);
$result = $this->httpGraphql($query);

$this->assertSqlQueries(
<<<'SQL'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public function testDiffValueNodeAndNestedValueNodeArgs(): void

$this->sqlCounterReset();

$result = $this->graphql($graphql);
$result = $this->httpGraphql($graphql);

$this->assertSqlQueries(
<<<'SQL'
select "users"."id", "users"."name" from "users";
Expand Down
Loading