From fba936c2dc9285223c12dc6bdef9ef21d8ddbe67 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 3 May 2022 17:39:47 +1200 Subject: [PATCH] Correct get list default values --- src/Appwrite/GraphQL/Builder.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/GraphQL/Builder.php b/src/Appwrite/GraphQL/Builder.php index c08175b90c..e81eec8cc6 100644 --- a/src/Appwrite/GraphQL/Builder.php +++ b/src/Appwrite/GraphQL/Builder.php @@ -322,6 +322,7 @@ class Builder $mutationFields = []; $limit = 1000; $offset = 0; + $wg = new WaitGroup(); while (!empty($attrs = Authorization::skip(fn() => $dbForProject->find( @@ -354,13 +355,13 @@ class Builder ]); $idArgs = [ 'id' => [ - 'type' => Type::string() + 'type' => Type::string(), ] ]; $listArgs = [ 'limit' => [ 'type' => Type::int(), - 'defaultValue' => $limit, + 'defaultValue' => 25, ], 'offset' => [ 'type' => Type::int(), @@ -368,7 +369,11 @@ class Builder ], 'cursor' => [ 'type' => Type::string(), - 'defaultValue' => null, + 'defaultValue' => '', + ], + 'cursorDirection' => [ + 'type' => Type::string(), + 'defaultValue' => Database::CURSOR_AFTER, ], 'orderAttributes' => [ 'type' => Type::listOf(Type::string()),