CKQueryOperation returns new cursor, but no results, eventually rejects requests

In my app, I am using CloudKit and one thing I need to do is to query all records of a certain record type. I am creating a CKQueryOperation with the record type I am interested in, leaving the rest to the defaults basically (resultsLimit, desiredKeys, qualityOfService etc). Most times, the app does not return any results at all, but does return a queryCursor, indicating there are more results to fetch. So I add a new CKQueryOperation with a CKQuery created with the returned queryCursor. But the same thing happens again (most of the times) - no results (or maybe a single result) and a new queryCursor. This goes on and on until either all results are returned (which usually is not the case) or CloudKit errors out with "Server rejected the request" (perhaps for rate-limiting reasons?).

The same behaviour can be observed when using the CloudKit web API, and it doesn't seem to matter what values I set for resultsLimit, desiredKeys, qualityOfService etc...

So, what am I doing wrong? How can I query all records of a record type without errors?

This is not a temporary phenomenon, it still happens. The same thing can be observed in the web UI (https://icloud.developer.apple.com/dashboard/database/teams/TEAMID). Either no results are shown at all when using the "Query records" button, or it errors out:

Still happening...

CKQueryOperation returns new cursor, but no results, eventually rejects requests
 
 
Q