File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
src/Config/Parser/GraphQL/ASTConverter Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 55namespace Overblog \GraphQLBundle \Config \Parser \GraphQL \ASTConverter ;
66
77use GraphQL \Language \AST \Node ;
8+ use GraphQL \Language \AST \ObjectTypeDefinitionNode ;
89
910class ObjectNode implements NodeInterface
1011{
1112 protected const TYPENAME = 'object ' ;
1213
1314 public static function toConfig (Node $ node ): array
15+ {
16+ return [
17+ 'type ' => static ::TYPENAME ,
18+ 'config ' => static ::parseConfig ($ node ),
19+ ];
20+ }
21+
22+ /**
23+ * @param ObjectTypeDefinitionNode $node
24+ *
25+ * @return array<string,mixed>
26+ */
27+ protected static function parseConfig (Node $ node ): array
1428 {
1529 $ config = DescriptionNode::toConfig ($ node ) + [
1630 'fields ' => FieldsNode::toConfig ($ node ),
@@ -24,9 +38,6 @@ public static function toConfig(Node $node): array
2438 $ config ['interfaces ' ] = $ interfaces ;
2539 }
2640
27- return [
28- 'type ' => static ::TYPENAME ,
29- 'config ' => $ config ,
30- ];
41+ return $ config ;
3142 }
3243}
You can’t perform that action at this time.
0 commit comments