You are here

public function EntityCrudOutputWrapper::__construct in GraphQL 8.3

CreateEntityOutputWrapper constructor.

Parameters

\Drupal\Core\Entity\EntityInterface|null $entity: The entity object that has been created or NULL if creation failed.

\Symfony\Component\Validator\ConstraintViolationListInterface|null $violations: The validation errors that occurred during creation or NULL if validation succeeded.

array|null $errors: An array of non validation error messages. Can be used to provide additional error messages e.g. for access restrictions.

File

modules/graphql_core/src/GraphQL/EntityCrudOutputWrapper.php, line 42

Class

EntityCrudOutputWrapper

Namespace

Drupal\graphql_core\GraphQL

Code

public function __construct(EntityInterface $entity = NULL, ConstraintViolationListInterface $violations = NULL, array $errors = NULL) {
  $this->entity = $entity;
  $this->violations = $violations;
  $this->errors = $errors;
}