diff --git a/composer.lock b/composer.lock index 832d3c25f5..84febe60a8 100644 --- a/composer.lock +++ b/composer.lock @@ -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", diff --git a/src/Appwrite/GraphQL/Resolvers.php b/src/Appwrite/GraphQL/Resolvers.php index 54a43b0515..65f8a64d68 100644 --- a/src/Appwrite/GraphQL/Resolvers.php +++ b/src/Appwrite/GraphQL/Resolvers.php @@ -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); diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 295348c665..5cd0e8366a 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -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. *