<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CloudKitJS",
  "identifier" : "/documentation/CloudKitJS/CloudKit.QueryResponse",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CloudKit JS"
    ],
    "preciseIdentifier" : "cl/CloudKit.QueryResponse"
  },
  "title" : "CloudKit.QueryResponse"
}
-->

# CloudKit.QueryResponse

A [`CloudKit.QueryResponse`](/documentation/CloudKitJS/CloudKit.QueryResponse) object encapsulates the results of using a query to fetch records

```
interface CloudKit.QueryResponse
```

## Overview

The [`performQuery`](/documentation/CloudKitJS/CloudKit.Database/performQuery) method in the [`CloudKit.Database`](/documentation/CloudKitJS/CloudKit.Database) class returns a `Promise` object that resolves to a [`CloudKit.QueryResponse`](/documentation/CloudKitJS/CloudKit.QueryResponse) object. You should not create instances of this class directly.

If the criteria matches more records than are returned by the server, the [`continuationMarker`](/documentation/CloudKitJS/CloudKit.QueryResponse/continuationMarker) property is non-`null`, or the [`moreComing`](/documentation/CloudKitJS/CloudKit.QueryResponse/moreComing) property is `true`. To fetch the rest of the matching records, pass the [`CloudKit.QueryResponse`](/documentation/CloudKitJS/CloudKit.QueryResponse) object to another [`performQuery`](/documentation/CloudKitJS/CloudKit.Database/performQuery) call until the [`continuationMarker`](/documentation/CloudKitJS/CloudKit.QueryResponse/continuationMarker) property is `null` or the [`moreComing`](/documentation/CloudKitJS/CloudKit.QueryResponse/moreComing) property is `false`.

For an example use of this class, see the [`performQuery`](/documentation/CloudKitJS/CloudKit.Database/performQuery) method in [`CloudKit.Database`](/documentation/CloudKitJS/CloudKit.Database).

## Topics

### Accessing Request Properties

[`readonly attribute CloudKit.ZoneID zoneID;`](/documentation/CloudKitJS/CloudKit.QueryResponse/zoneID)

A [`CloudKit.ZoneID`](/documentation/CloudKitJS/CloudKit.ZoneID) dictionary that identifies a record zone in the database.

[`readonly attribute Number resultsLimit;`](/documentation/CloudKitJS/CloudKit.QueryResponse/resultsLimit)

The maximum number of records to fetch.

[`readonly attribute String continuationMarker;`](/documentation/CloudKitJS/CloudKit.QueryResponse/continuationMarker)

Marks the location of the last batch of results.

[`readonly attribute String[] desiredKeys;`](/documentation/CloudKitJS/CloudKit.QueryResponse/desiredKeys)

An array of strings containing record field names that limits the amount of data returned in this operation.

[`readonly attribute Boolean zoneWide;`](/documentation/CloudKitJS/CloudKit.QueryResponse/zoneWide)

A Boolean value that determines whether all zones should be searched.

### Accessing Response Properties

[`readonly attribute Boolean moreComing;`](/documentation/CloudKitJS/CloudKit.QueryResponse/moreComing)

A Boolean value that indicates whether there are more records to fetch.

[`readonly attribute CloudKit.Query query;`](/documentation/CloudKitJS/CloudKit.QueryResponse/query)

A [`CloudKit.Query`](/documentation/CloudKitJS/CloudKit.Query) dictionary containing the criteria for matching records in the database.

### Identifying the Class

[`readonly attribute Boolean isQueryResponse;`](/documentation/CloudKitJS/CloudKit.QueryResponse/isQueryResponse)

A Boolean value indicating whether this object is an instance of the [`CloudKit.QueryResponse`](/documentation/CloudKitJS/CloudKit.QueryResponse) class.

### Logging

[`String toString();`](/documentation/CloudKitJS/CloudKit.QueryResponse/toString)

Returns a string representation of this [`CloudKit.QueryResponse`](/documentation/CloudKitJS/CloudKit.QueryResponse) object.

## Relationships

### Inherited By

[`CloudKit.RecordsResponse`](/documentation/CloudKitJS/CloudKit.RecordsResponse)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)