From 59fce99ef6e69c4a756a471ff21cbde3f9aebaf9 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 21 Jul 2025 19:15:29 +0530 Subject: [PATCH 1/2] bump: response format for preview sdk. --- src/Appwrite/Platform/Tasks/SDKs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index 9ec968a9c0..a4346ca83d 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -271,7 +271,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ->setTwitter(APP_SOCIAL_TWITTER_HANDLE) ->setDiscord(APP_SOCIAL_DISCORD_CHANNEL, APP_SOCIAL_DISCORD) ->setDefaultHeaders([ - 'X-Appwrite-Response-Format' => '1.7.0', + 'X-Appwrite-Response-Format' => '1.8.0', ]) ->setExclude($language['exclude'] ?? []); From 97c54aeaacdb56502abe9d0712c2b1dca2af0c9b Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 22 Jul 2025 09:31:09 +0530 Subject: [PATCH 2/2] fix: add wildcards on `getDocument` response model as well. --- src/Appwrite/Utopia/Request/Filters/V20.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index 8719cf7325..bb25f39c8e 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -16,7 +16,7 @@ class V20 extends Filter switch ($model) { case 'databases.getDocument': case 'databases.listDocuments': - $content = $this->manageSelectQueries($content, $model); + $content = $this->manageSelectQueries($content); break; } return $content; @@ -30,7 +30,7 @@ class V20 extends Filter * This filter preserves 1.7.x behavior by including all related documents for backward compatibility with * `listDocuments` and `getDocument` calls. */ - protected function manageSelectQueries(array $content, string $model): array + protected function manageSelectQueries(array $content): array { $hasWildcard = false; if (! isset($content['queries'])) { @@ -58,7 +58,10 @@ class V20 extends Filter } } - if ($hasWildcard && $model === 'databases.listDocuments') { + /** + * Add `keys.*` for all model types! + */ + if ($hasWildcard) { $relatedKeys = $this->getRelatedCollectionKeys(); if (! empty($relatedKeys)) {