protected function SchemaPluginBase::buildType in GraphQL 8.3
Retrieves the type instance for the given reference.
Parameters
array $type: The type reference.
Return value
\GraphQL\Type\Definition\Type The type instance.
2 calls to SchemaPluginBase::buildType()
- SchemaPluginBase::getType in src/
Plugin/ GraphQL/ Schemas/ SchemaPluginBase.php - Retrieve the type instance for a given type name.
- SchemaPluginBase::resolveType in src/
Plugin/ GraphQL/ Schemas/ SchemaPluginBase.php - Resolves a given value to a concrete type.
File
- src/
Plugin/ GraphQL/ Schemas/ SchemaPluginBase.php, line 489
Class
Namespace
Drupal\graphql\Plugin\GraphQL\SchemasCode
protected function buildType($type) {
if (!isset($this->types[$type['id']])) {
$creator = [
$type['class'],
'createInstance',
];
$manager = $this->typeManagers
->getTypeManager($type['type']);
$this->types[$type['id']] = $creator($this, $manager, $type['definition'], $type['id']);
}
return $this->types[$type['id']];
}