Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

queryMore with the Apex Connector Framework

Custom adapters for Salesforce Connect don’t automatically support the queryMore method in API queries. However, your implementation must be able to break up large result sets into batches and iterate over them by using the queryMore method in the SOAP API. The default batch size is 500 records, but the query developer can adjust that value programmatically in the query call.
To support queryMore, your implementation must indicate whether more data exists than what’s in the current batch. When the Lightning Platform knows that more data exists, your API queries return a QueryResult object that’s similar to the following.
1{
2         "totalSize" => -1,
3              "done" => false,
4    "nextRecordsUrl" => "/services/data/v32.0/query/01gxx000000B5OgAAK-2000",
5           "records" => [
6        [   0] {
7            "attributes" => {
8                "type" => "Sample__x",
9                 "url" => 
10                     "/services/data/v32.0/sobjects/Sample__x/x06xx0000000001AAA"
11            },
12            "ExternalId" => "id0"
13        },
14        [   1] {
15            "attributes" => {
16                "type" => "Sample__x",
17                 "url" => 
18                     "/services/data/v32.0/sobjects/Sample__x/x06xx0000000002AAA"
19            },
20
21}