diff --git a/src/Datastore/Operation.php b/src/Datastore/Operation.php index adfa8d2ecad5..bb58c31245ea 100644 --- a/src/Datastore/Operation.php +++ b/src/Datastore/Operation.php @@ -405,7 +405,7 @@ public function runQuery(QueryInterface $query, array $options = []) yield $result; } - if ($query->canPaginate() && $res['batch']['moreResults'] !== 'NO_MORE_RESULTS') { + if ($query->canPaginate() && $res['batch']['moreResults'] === 'NOT_FINISHED') { $query->start($res['batch']['endCursor']); } else { $moreResults = false; diff --git a/tests/fixtures/datastore/query-results.json b/tests/fixtures/datastore/query-results.json index a2fa71da0ff1..cee3daf1e474 100644 --- a/tests/fixtures/datastore/query-results.json +++ b/tests/fixtures/datastore/query-results.json @@ -82,7 +82,7 @@ } ], "endCursor": "1234", - "moreResults": "MORE_RESULTS_AFTER_CURSOR" + "moreResults": "NOT_FINISHED" } }, { "batch": {