Iterating over cloudflare.hyperdrive.configs.list only returns the first page

Open
#2,722 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
api

Research direction

Begin at the cloudflare.hyperdrive.configs.list entry point and trace how its async iteration handles response pages. Reproduce the issue with an account containing more than 20 Hyperdrive configs, then verify that iteration reaches every config rather than stopping after the first page.

Written by the indexing model from the issue text.

Description

Confirm this is a Typescript library issue and not an underlying Cloudflare API issue
  • This is an issue with the Typescript library
Describe the bug

The following code only iterates over the first page (returning max 20 elements):

for await (const config of cloudflare.hyperdrive.configs.list({
    account_id: accountId,
})) {
    //
}
To Reproduce

Run the code on an account with more than 20 hyperdrive configs.

Code snippets

OS

Linux / Mac

Runtime version

Not relevant

Library version

6.0.0-beta.1 but also 5.x.x

Dominant language
TypeScript
Stars
835
Forks
201
Avg merge
41m
Merged PRs (30d)
1

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/cloudflare-typescript

All issues in cloudflare/cloudflare-typescript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.