@@ -32,11 +32,6 @@ class GraphQl
32
32
*/
33
33
private $ config ;
34
34
35
- /**
36
- * @var ResponseHttp
37
- */
38
- private $ response ;
39
-
40
35
/**
41
36
* @var HttpRequestProcessor
42
37
*/
@@ -55,7 +50,7 @@ class GraphQl
55
50
/**
56
51
* @param CacheableQuery $cacheableQuery
57
52
* @param Config $config
58
- * @param ResponseHttp $response
53
+ * @param ResponseHttp $response @deprecated do not use
59
54
* @param HttpRequestProcessor $requestProcessor
60
55
* @param Registry $registry
61
56
* @param CacheIdCalculator $cacheIdCalculator
@@ -70,7 +65,6 @@ public function __construct(
70
65
) {
71
66
$ this ->cacheableQuery = $ cacheableQuery ;
72
67
$ this ->config = $ config ;
73
- $ this ->response = $ response ;
74
68
$ this ->requestProcessor = $ requestProcessor ;
75
69
$ this ->registry = $ registry ;
76
70
$ this ->cacheIdCalculator = $ cacheIdCalculator ;
@@ -112,12 +106,12 @@ public function afterRenderResult(ResultInterface $subject, ResultInterface $res
112
106
113
107
$ cacheId = $ this ->cacheIdCalculator ->getCacheId ();
114
108
if ($ cacheId ) {
115
- $ this -> response ->setHeader (CacheIdCalculator::CACHE_ID_HEADER , $ cacheId , true );
109
+ $ response ->setHeader (CacheIdCalculator::CACHE_ID_HEADER , $ cacheId , true );
116
110
}
117
111
118
112
if ($ this ->cacheableQuery ->shouldPopulateCacheHeadersWithTags ()) {
119
- $ this -> response ->setPublicHeaders ($ this ->config ->getTtl ());
120
- $ this -> response ->setHeader ('X-Magento-Tags ' , implode (', ' , $ this ->cacheableQuery ->getCacheTags ()), true );
113
+ $ response ->setPublicHeaders ($ this ->config ->getTtl ());
114
+ $ response ->setHeader ('X-Magento-Tags ' , implode (', ' , $ this ->cacheableQuery ->getCacheTags ()), true );
121
115
} else {
122
116
$ sendNoCacheHeaders = true ;
123
117
}
@@ -126,7 +120,7 @@ public function afterRenderResult(ResultInterface $subject, ResultInterface $res
126
120
}
127
121
128
122
if ($ sendNoCacheHeaders ) {
129
- $ this -> response ->setNoCacheHeaders ();
123
+ $ response ->setNoCacheHeaders ();
130
124
}
131
125
132
126
return $ result ;
0 commit comments