Merge pull request #11879 from appwrite/fix/graphql-batch-sent-reset

fix: reset response sent state between batched GraphQL queries
This commit is contained in:
Damodar Lohani
2026-04-13 11:35:22 +05:45
committed by GitHub
3 changed files with 18 additions and 6 deletions
Generated
+6 -6
View File
@@ -4271,16 +4271,16 @@
},
{
"name": "utopia-php/http",
"version": "0.34.19",
"version": "0.34.20",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/http.git",
"reference": "995c119f31866cacd42d63b1f922bf86eabb396c"
"reference": "d6b360d555022d16c16d40be51f86180364819f8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/http/zipball/995c119f31866cacd42d63b1f922bf86eabb396c",
"reference": "995c119f31866cacd42d63b1f922bf86eabb396c",
"url": "https://api.github.com/repos/utopia-php/http/zipball/d6b360d555022d16c16d40be51f86180364819f8",
"reference": "d6b360d555022d16c16d40be51f86180364819f8",
"shasum": ""
},
"require": {
@@ -4319,9 +4319,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/http/issues",
"source": "https://github.com/utopia-php/http/tree/0.34.19"
"source": "https://github.com/utopia-php/http/tree/0.34.20"
},
"time": "2026-04-08T10:23:17+00:00"
"time": "2026-04-12T14:25:22+00:00"
},
{
"name": "utopia-php/image",
+1
View File
@@ -262,6 +262,7 @@ class Resolvers
$request = clone $request;
$utopia->setResource('request', static fn () => $request);
$response->setContentType(Response::CONTENT_TYPE_NULL);
$response->clearSent();
try {
$route = $utopia->match($request, fresh: true);
+11
View File
@@ -626,6 +626,17 @@ class Response extends SwooleResponse
return $this->payload;
}
/**
* Reset the sent flag so the response can be reused for another
* action execution (e.g. batched GraphQL queries that share one
* Response instance).
*/
public function clearSent(): static
{
$this->sent = false;
return $this;
}
/**
* Function to add a response filter, the order of filters are first in - first out.
*