@@ -40,16 +40,19 @@ public function getDefinition(PluggableSchemaBuilderInterface $schemaBuilder) {
4040 if (!isset ($ this ->definition )) {
4141 $ definition = $ this ->getPluginDefinition ();
4242
43- $ config = [
44- 'name ' => $ this ->buildName (),
45- 'description ' => $ this ->buildDescription (),
46- 'type ' => $ this ->buildType ($ schemaBuilder ),
47- 'args ' => $ this ->buildArguments ($ schemaBuilder ),
48- 'isDeprecated ' => !empty ($ definition ['deprecated ' ]),
49- 'deprecationReason ' => !empty ($ definition ['deprecated ' ]) ? !empty ($ definition ['deprecated ' ]) : '' ,
50- ];
51-
52- $ this ->definition = new Field ($ this , $ schemaBuilder , $ config );
43+ if ($ type = $ this ->buildType ($ schemaBuilder )) {
44+ $ this ->definition = new Field ($ this , $ schemaBuilder , [
45+ 'name ' => $ this ->buildName (),
46+ 'description ' => $ this ->buildDescription (),
47+ 'type ' => $ type ,
48+ 'isDeprecated ' => !empty ($ definition ['deprecated ' ]),
49+ 'deprecationReason ' => !empty ($ definition ['deprecated ' ]) ? !empty ($ definition ['deprecated ' ]) : '' ,
50+ ]);
51+
52+ if ($ args = $ this ->buildArguments ($ schemaBuilder )) {
53+ $ this ->definition ->addArguments ($ args );
54+ }
55+ }
5356 }
5457
5558 return $ this ->definition ;
0 commit comments