File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/Config/Parser/GraphQL/ASTConverter Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 6
6
7
7
use GraphQL \Language \AST \Node ;
8
8
use GraphQL \Language \AST \StringValueNode ;
9
+ use GraphQL \Language \AST \TypeExtensionNode ;
9
10
use function trim ;
10
11
11
12
class DescriptionNode implements NodeInterface
12
13
{
13
14
public static function toConfig (Node $ node ): array
14
15
{
16
+ if ($ node instanceof TypeExtensionNode) {
17
+ return [];
18
+ }
19
+
15
20
return ['description ' => self ::cleanAstDescription ($ node ->description )];
16
21
}
17
22
@@ -21,8 +26,6 @@ private static function cleanAstDescription(?StringValueNode $description): ?str
21
26
return null ;
22
27
}
23
28
24
- $ description = trim ($ description ->value );
25
-
26
- return empty ($ description ) ? null : $ description ;
29
+ return trim ($ description ->value ) ?: null ;
27
30
}
28
31
}
You can’t perform that action at this time.
0 commit comments