Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1250978
Align `BuildSchemaTest` with `graphql-js` v14.0
vhenzl Sep 2, 2021
33c6bc1
Align `BuildSchemaTest` with `graphql-js` v14.7
vhenzl Sep 2, 2021
f550da8
Align `BuildSchemaTest` with `graphql-js` v15.0
vhenzl Sep 2, 2021
7ba8ff4
Align `BuildSchemaTest` with `graphql-js` v15.5
vhenzl Sep 2, 2021
0960b68
Align `BuildSchemaTest` with `graphql-js` v15.5 (input & args depreca…
vhenzl Sep 2, 2021
39a49f9
Align `BuildSchemaTest` with `graphql-js` v15.5 (specifiedBy directive)
vhenzl Sep 2, 2021
94c15a0
Merge branch 'master' into schema-build-tests
vhenzl Oct 16, 2021
bb2640e
Merge commit '618b418b' into schema-build-tests
vhenzl Jun 2, 2022
b44c186
Merge commit 'd53d6889' into schema-build-tests
vhenzl Jun 2, 2022
ae09031
Merge commit '60a19029' into schema-build-tests
vhenzl Jun 2, 2022
74fc4e7
Merge commit 'f019a88e' into schema-build-tests
vhenzl Jun 2, 2022
a35fb10
Fix merge
vhenzl Jun 2, 2022
4c44622
Merge commit '66750fc4' into schema-build-tests
vhenzl Jun 2, 2022
083821e
Fix CS
vhenzl Jun 2, 2022
b996456
Fix comments
vhenzl Jun 2, 2022
9a0a778
Merge commit '09b81c80' into schema-build-tests
vhenzl Jun 2, 2022
add75d0
Merge commit '130ae955' into schema-build-tests
vhenzl Jun 2, 2022
2de78d6
Merge commit '5b41769e' into schema-build-tests
vhenzl Jun 2, 2022
bd137ff
Merge commit 'cf0c6939' into schema-build-tests
vhenzl Jun 2, 2022
f730807
Fix merge
vhenzl Jun 2, 2022
1313cb9
Merge commit '661078a4' into schema-build-tests
vhenzl Jun 2, 2022
c83a083
Merge commit '460a1c7c' into schema-build-tests
vhenzl Jun 2, 2022
3662b31
Merge commit '0b5d7e63' into schema-build-tests
vhenzl Jun 2, 2022
787305a
Merge commit '9791dc1e' into schema-build-tests
vhenzl Jun 2, 2022
e44b2b0
Merge branch 'master' into schema-build-tests
vhenzl Jun 2, 2022
f73ece4
Resolve general PHPStan problems
vhenzl Jun 2, 2022
a438cf7
Skip tests for `@specifiedBy` directive
vhenzl Jun 2, 2022
efc0056
Skip tests for input & args deprecations
vhenzl Jun 2, 2022
3b64673
Fix assertCycle
vhenzl Jun 2, 2022
3c4fe64
Fix test name
vhenzl Jun 2, 2022
ea5bb75
Replace `@var` with `assertInstanceOf()`
vhenzl Jun 2, 2022
84e2925
Make the test class final
vhenzl Jun 2, 2022
304f5db
Make assertCycle static
vhenzl Jun 2, 2022
eb6597b
Merge branch 'master' into schema-build-tests
spawnia Jun 8, 2022
b2a7738
Fix @specifiedBy tests
spawnia Jun 8, 2022
164e6a4
assertSame
spawnia Jun 8, 2022
dc5777c
ignore missing schema description
spawnia Jun 8, 2022
c59dbeb
ignore @deprecated on inputs
spawnia Jun 8, 2022
08f9d19
tighten assertions
spawnia Jun 8, 2022
8e3b6b9
fix directive order
spawnia Jun 8, 2022
e709221
fix phpstan
spawnia Jun 8, 2022
85e13d0
remove dedent
spawnia Jun 8, 2022
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
10 changes: 4 additions & 6 deletions src/Utils/BuildSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,20 +179,18 @@ static function (string $typeName): Type {
$directiveDefs
);

// If specified directives were not explicitly declared, add them.
$directivesByName = [];
foreach ($directives as $directive) {
$directivesByName[$directive->name][] = $directive;
}

if (! isset($directivesByName['skip'])) {
$directives[] = Directive::skipDirective();
}

// If specified directives were not explicitly declared, add them.
if (! isset($directivesByName['include'])) {
$directives[] = Directive::includeDirective();
}

if (! isset($directivesByName['skip'])) {
$directives[] = Directive::skipDirective();
}
if (! isset($directivesByName['deprecated'])) {
$directives[] = Directive::deprecatedDirective();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Type/IntrospectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ public function testExecutesAnIntrospectionQuery(): void
],
'directives' => [
[
'name' => 'skip',
'name' => 'include',
'args' => [
0 => [
'name' => 'if',
Expand All @@ -857,7 +857,7 @@ public function testExecutesAnIntrospectionQuery(): void
],
],
[
'name' => 'include',
'name' => 'skip',
'args' => [
0 => [
'name' => 'if',
Expand Down
Loading