public static function InputTypePluginBase::createInstance in GraphQL 8.3
Parameters
\Drupal\graphql\Plugin\SchemaBuilderInterface $builder:
\Drupal\graphql\Plugin\TypePluginManager $manager:
$definition:
$id:
Return value
mixed
Overrides TypePluginInterface::createInstance
File
- src/
Plugin/ GraphQL/ InputTypes/ InputTypePluginBase.php, line 23
Class
Namespace
Drupal\graphql\Plugin\GraphQL\InputTypesCode
public static function createInstance(SchemaBuilderInterface $builder, TypePluginManager $manager, $definition, $id) {
return new InputObjectType([
'name' => $definition['name'],
'description' => $definition['description'],
'contexts' => $definition['contexts'],
'fields' => function () use ($builder, $definition) {
return $builder
->processArguments($definition['fields']);
},
]);
}