You are here

public function Response::mergeViolations in GraphQL 8.4

Adds the violations from another response to this response.

Overrides ResponseInterface::mergeViolations

File

src/GraphQL/Response/Response.php, line 46

Class

Response
Base class for responses containing the violations.

Namespace

Drupal\graphql\GraphQL\Response

Code

public function mergeViolations(ResponseInterface $source) : void {
  $this->violations = array_merge($this->violations, $source
    ->getViolations());
}