You are here

public function SubRequestResponse::__construct in GraphQL 8.4

SubrequestResponse constructor.

Parameters

mixed $result: The request result.

int $status: The response status code.

array $headers: An array of response headers.

File

src/SubRequestResponse.php, line 32

Class

SubRequestResponse
Helper class that holds a request result for subrequests.

Namespace

Drupal\graphql

Code

public function __construct($result, $status = 200, array $headers = []) {
  parent::__construct('', $status, $headers);
  $this->result = $result;
}