public function Required::resolve in GraphQL 8.4
Resolves the "required" property.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $entity_definition_field: The entity field definition.
Return value
bool If the field is required or not.
File
- src/
Plugin/ GraphQL/ DataProducer/ EntityDefinition/ Fields/ Required.php, line 36
Class
- Required
- Retrieves the "required" property from a given field definition.
Namespace
Drupal\graphql\Plugin\GraphQL\DataProducer\EntityDefinition\FieldsCode
public function resolve(FieldDefinitionInterface $entity_definition_field) : bool {
return $entity_definition_field
->isRequired();
}