@@ 293-301 (lines=9) @@ | ||
290 | // plugin instantiation at run-time unless a plugin is actually called from |
|
291 | // the graphql query execution. Plugins should take care of not having to |
|
292 | // instantiate their plugin instances during schema composition. |
|
293 | return array_map(function ($type) { |
|
294 | $manager = $this->typeManagers[$type['type']]; |
|
295 | /** @var \Drupal\graphql\Plugin\TypePluginInterface $instance */ |
|
296 | $instance = $manager->getInstance(['id' => $type['id']]); |
|
297 | ||
298 | return [ |
|
299 | 'definition' => $instance->getDefinition(), |
|
300 | ] + $type; |
|
301 | }, $types); |
|
302 | } |
|
303 | ||
304 | /** |
|
@@ 473-479 (lines=7) @@ | ||
470 | return $carry; |
|
471 | }, []); |
|
472 | ||
473 | return array_map(function ($definition) { |
|
474 | $id = $definition['id']; |
|
475 | $instance = $this->mutationManager->getInstance(['id' => $id]); |
|
476 | return [ |
|
477 | 'definition' => $instance->getDefinition(), |
|
478 | ] + $definition; |
|
479 | }, $mutations); |
|
480 | } |
|
481 | ||
482 | /** |