Skip to content

feat: add chunkSize to the listRequests() and listKeys() iterators - #1142

Merged
vdusek merged 3 commits into
masterfrom
feat/list-chunk-size
Oct 12, 2026
Merged

vdusek merged 3 commits into
masterfrom
feat/list-chunk-size

Conversation

@vdusek

@vdusek vdusek commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

requestQueue.listRequests() and keyValueStore.listKeys() take a chunkSize option, like the other paginated iterators. Each page asks for at most chunkSize items, or for what's left of limit if that's smaller. chunkSize is never sent to the API and has no default, so existing calls send the same requests.

minForLimitParam moved to src/utils.ts so both iterators can share it. createKeysPublicUrl() builds a URL and doesn't page, so its options type leaves chunkSize out.

One small side effect: an explicit limit: 0 is now left out of the first request, as the offset-paginated list() methods already do. The API reads 0 as unset.

Closes: #1130
Closes: #1131

✍️ Drafted by Claude Code

@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 9, 2026
@vdusek vdusek self-assigned this Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ There are broken links in the documentation.

See more at https://github.com/apify/apify-client-js/actions/runs/38231762271#summary-114752688089

@vdusek
vdusek requested a review from barjin October 12, 2026 07:14
@vdusek
vdusek marked this pull request as ready for review October 12, 2026 07:14
@vdusek
vdusek requested a review from szaganek as a code owner October 12, 2026 07:14

@barjin barjin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just one docs nit ⬇️

Thanks!

Comment thread docs/02_concepts/07_pagination.mdx Outdated
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 12, 2026
@vdusek
vdusek merged commit 2d61192 into master Oct 12, 2026
9 of 10 checks passed
@vdusek
vdusek deleted the feat/list-chunk-size branch October 12, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add chunkSize to the keyValueStore.listKeys() iterator Add chunkSize to the requestQueue.listRequests() iterator

3 participants