Skip to content

Commit 3a50fa8

Browse files
authored
Add test
1 parent 941c5fc commit 3a50fa8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/Config/Parser/MetadataParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ public function testArgsAndReturnGuessing(): void
452452
'type' => 'Int',
453453
'args' => [
454454
'areaId' => ['type' => 'Int!'],
455-
'raceId' => ['type' => 'String!'],
455+
'raceId' => ['type' => 'String!', 'description' => 'A race ID'],
456456
'dayStart' => ['type' => 'Int', 'defaultValue' => null],
457457
'dayEnd' => ['type' => 'Int', 'defaultValue' => null],
458458
'nameStartingWith' => ['type' => 'String', 'defaultValue' => ''],

tests/Config/Parser/fixtures/annotations/Type/Battle.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ final class Battle
2121

2222
/**
2323
* @GQL\Field(name="casualties", complexity="childrenComplexity * 5")
24+
* @GQL\Arg(name="raceId", type="String!", description="A race ID")
2425
*/
2526
#[GQL\Field(name: 'casualties', complexity: 'childrenComplexity * 5')]
27+
#[GQL\Arg(name: 'raceId', type: 'String!', description: 'A race ID')]
2628
public function getCasualties(
2729
int $areaId,
28-
string $raceId,
30+
?string $raceId,
2931
int $dayStart = null,
3032
int $dayEnd = null,
3133
string $nameStartingWith = '',

0 commit comments

Comments
 (0)