class SubRequestResponse in GraphQL 8.4
Helper class that holds a request result for subrequests.
Hierarchy
- class \Drupal\graphql\SubRequestResponse extends \Symfony\Component\HttpFoundation\Response implements RefinableCacheableDependencyInterface uses RefinableCacheableDependencyTrait
Expanded class hierarchy of SubRequestResponse
1 file declares its use of SubRequestResponse
- SubrequestExtractionController.php in src/
Controller/ SubrequestExtractionController.php
File
- src/
SubRequestResponse.php, line 12
Namespace
Drupal\graphqlView source
class SubRequestResponse extends Response implements RefinableCacheableDependencyInterface {
use RefinableCacheableDependencyTrait;
/**
* The request result.
*
* @var mixed
*/
protected $result;
/**
* SubrequestResponse constructor.
*
* @param mixed $result
* The request result.
* @param int $status
* The response status code.
* @param array $headers
* An array of response headers.
*/
public function __construct($result, $status = 200, array $headers = []) {
parent::__construct('', $status, $headers);
$this->result = $result;
}
/**
* Gets the request result.
*
* @return mixed
* The request result.
*/
public function getResult() {
return $this->result;
}
}