Skip to content

Commit db3743d

Browse files
author
Jeremiah VALERIE
committed
Merge branch '0.11' into 0.12
2 parents 6d7eeb7 + ea58a4e commit db3743d

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/Config/Parser/GraphQL/ASTConverter/EnumNode.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ public static function toConfig(Node $node): array
1313
$config = DescriptionNode::toConfig($node);
1414

1515
$values = [];
16+
1617
foreach ($node->values as $value) {
17-
$values[$value->name->value] = DescriptionNode::toConfig($node) + [
18+
$values[$value->name->value] = DescriptionNode::toConfig($value) + [
1819
'value' => $value->name->value,
1920
];
2021

2122
$directiveConfig = DirectiveNode::toConfig($value);
23+
2224
if (isset($directiveConfig['deprecationReason'])) {
2325
$values[$value->name->value]['deprecationReason'] = $directiveConfig['deprecationReason'];
2426
}

tests/Config/Parser/fixtures/graphql/schema.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ type Starship {
1616

1717
enum Episode {
1818
NEWHOPE
19+
"""Star Wars: Episode V – The Empire Strikes Back"""
1920
EMPIRE
2021
JEDI @deprecated
2122
}

tests/Config/Parser/fixtures/graphql/schema.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,14 @@
5858
'config' => [
5959
'description' => null,
6060
'values' => [
61-
'NEWHOPE' => ['description' => null, 'value' => 'NEWHOPE'],
62-
'EMPIRE' => ['description' => null, 'value' => 'EMPIRE'],
61+
'NEWHOPE' => [
62+
'description' => null,
63+
'value' => 'NEWHOPE',
64+
],
65+
'EMPIRE' => [
66+
'description' => 'Star Wars: Episode V – The Empire Strikes Back',
67+
'value' => 'EMPIRE',
68+
],
6369
'JEDI' => [
6470
'description' => null,
6571
'value' => 'JEDI',

0 commit comments

Comments
 (0)