diff --git a/src/Appwrite/GraphQL/Resolvers.php b/src/Appwrite/GraphQL/Resolvers.php index d42183a4f0..a305229296 100644 --- a/src/Appwrite/GraphQL/Resolvers.php +++ b/src/Appwrite/GraphQL/Resolvers.php @@ -249,9 +249,13 @@ class Resolvers return; } - $payload = \array_map(function ($property) { - return \str_replace('$', '_', $property); - }, $payload); + foreach ($payload as $key => $value) { + if (\str_starts_with($key, '$')) { + $escapedKey = \str_replace('$', '_', $key); + $payload[$escapedKey] = $value; + unset($payload[$key]); + } + } $resolve($payload); }