Skip to content

Commit c74d830

Browse files
committed
Check instance of resource instead of not string
1 parent fb2e6aa commit c74d830

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/Migration/Sources/Appwrite/Reader

src/Migration/Sources/Appwrite/Reader/API.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ public function queryEqual(string $attribute, array $values): string
190190
*/
191191
public function queryCursorAfter(Resource|string $resource): string
192192
{
193-
if (!\is_string($resource)) {
194-
throw new \InvalidArgumentException('Querying with a cursor through the API requires a string resource ID');
193+
if ($resource instanceof Resource) {
194+
$resource = $resource->getId();
195195
}
196196

197197
return Query::cursorAfter($resource);

0 commit comments

Comments
 (0)