mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix GraphQL coroutine context propagation
Promises\Swoole was already propagating the request container into child coroutines, but using its own pre-existing key (__utopia_http_request_container) rather than the new utopia-php/http key (__utopia__). With the keys mismatched, the propagation was dead code and resolvers spawned from webonyx coroutines saw an empty context, failing every GraphQL query with 'Dependency utopia:graphql not found'. Align the key so child coroutines actually inherit the request's container (wrapped as a child Container, so request-scoped overrides in the resolver can't bleed back into the outer request). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ use Utopia\DI\Container;
|
||||
|
||||
class Swoole extends Promise
|
||||
{
|
||||
private const REQUEST_CONTAINER_CONTEXT_KEY = '__utopia_http_request_container';
|
||||
private const REQUEST_CONTAINER_CONTEXT_KEY = '__utopia__';
|
||||
|
||||
public function __construct(?callable $executor = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user