|
@@ 291-299 (lines=9) @@
|
| 288 |
|
// plugin instantiation at run-time unless a plugin is actually called from |
| 289 |
|
// the graphql query execution. Plugins should take care of not having to |
| 290 |
|
// instantiate their plugin instances during schema composition. |
| 291 |
|
return array_map(function ($type) { |
| 292 |
|
$manager = $this->typeManagers[$type['type']]; |
| 293 |
|
/** @var \Drupal\graphql\Plugin\TypePluginInterface $instance */ |
| 294 |
|
$instance = $manager->createInstance($type['id']); |
| 295 |
|
|
| 296 |
|
return [ |
| 297 |
|
'definition' => $instance->getDefinition(), |
| 298 |
|
] + $type; |
| 299 |
|
}, $types); |
| 300 |
|
} |
| 301 |
|
|
| 302 |
|
/** |
|
@@ 463-471 (lines=9) @@
|
| 460 |
|
return $carry; |
| 461 |
|
}, []); |
| 462 |
|
|
| 463 |
|
return array_map(function ($definition) { |
| 464 |
|
$id = $definition['id']; |
| 465 |
|
$instance = $this->mutationManager->createInstance($id); |
| 466 |
|
|
| 467 |
|
$carry[$id] = [ |
| 468 |
|
'id' => $id, |
| 469 |
|
'definition' => $instance->getDefinition(), |
| 470 |
|
]; |
| 471 |
|
}, $mutations); |
| 472 |
|
} |
| 473 |
|
|
| 474 |
|
/** |