1 | <?php |
||
9 | class CacheableQueryResponse extends CacheableJsonResponse { |
||
10 | |||
11 | /** |
||
12 | * Cache metadata collected during query execution. |
||
13 | * |
||
14 | * @var \Drupal\Core\Cache\CacheableDependencyInterface |
||
15 | */ |
||
16 | protected $responseMetadata; |
||
17 | |||
18 | /** |
||
19 | * Static response cache metadata from the schema. |
||
20 | * |
||
21 | * @var \Drupal\Core\Cache\CacheableDependencyInterface |
||
22 | */ |
||
23 | protected $schemaResponseMetadata; |
||
24 | |||
25 | /** |
||
26 | * CacheableQueryResponse constructor. |
||
27 | * |
||
28 | * @param \Drupal\graphql\GraphQL\Execution\QueryResult $data |
||
29 | * The graphql query result object. |
||
30 | * @param int $status |
||
31 | * The http status code of the response. |
||
32 | * @param array $headers |
||
33 | * The http headers of the response. |
||
34 | */ |
||
35 | public function __construct(QueryResult $data, $status = 200, array $headers = []) { |
||
45 | |||
46 | /** |
||
47 | * Gets the response cache metadata. |
||
48 | * |
||
49 | * @return \Drupal\Core\Cache\CacheableDependencyInterface |
||
50 | * The response cache metadata. |
||
51 | */ |
||
52 | public function getResponseMetadata() { |
||
55 | |||
56 | /** |
||
57 | * Gets the schema's response cache metadata. |
||
58 | * |
||
59 | * @return \Drupal\Core\Cache\CacheableDependencyInterface |
||
60 | * The schema's response cache metadata. |
||
61 | */ |
||
62 | public function getSchemaResponseMetadata() { |
||
65 | |||
66 | } |