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 66
77use GraphQL \Language \AST \Node ;
88use GraphQL \Language \AST \StringValueNode ;
9+ use GraphQL \Language \AST \TypeExtensionNode ;
910use function trim ;
1011
1112class DescriptionNode implements NodeInterface
1213{
1314 public static function toConfig (Node $ node ): array
1415 {
16+ if ($ node instanceof TypeExtensionNode) {
17+ return [];
18+ }
19+
1520 return ['description ' => self ::cleanAstDescription ($ node ->description )];
1621 }
1722
@@ -21,8 +26,6 @@ private static function cleanAstDescription(?StringValueNode $description): ?str
2126 return null ;
2227 }
2328
24- $ description = trim ($ description ->value );
25-
26- return empty ($ description ) ? null : $ description ;
29+ return trim ($ description ->value ) ?: null ;
2730 }
2831}
You can’t perform that action at this time.
0 commit comments