Skip to content

fix: page size and cursor in getNextPage - #605

Draft
Justin Hammond (Justintime50) wants to merge 3 commits into
masterfrom
fix_next_page_size
Draft

Justin Hammond (Justintime50) wants to merge 3 commits into
masterfrom
fix_next_page_size

Conversation

@Justintime50

@Justintime50 Justin Hammond (Justintime50) commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes two next-page bugs:

  • getNextPage (and User.getNextPage for child users) built the next-page params with defaultParams.page_size ?? pageSize, so the page_size of the original all call always won over the pageSize passed in. The order is now pageSize ?? defaultParams.page_size, so an explicit pageSize wins and the original one is still reused when none is given.
  • Both re-sent the params of the original all call, so a first call with after_id (or before_id for child users) made the next page send both cursors, which the API rejects with a 400. The opposite cursor is now dropped.

Testing

  • Added getNextPage uses the page size passed into it over the one passed into all and getNextPage does not send the after_id passed into all to the base service tests, using the same request mocking as the other tests there.
  • just lint and the type tests pass.

Pull Request Type

  • Bug fix (non-breaking change which fixes an issue)

@Justintime50 Justin Hammond (Justintime50) changed the title fix: use the page size passed into getNextPage fix: page size and cursor in getNextPage Nov 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant