Skip to content

horizonPaginator.ts: Add automatic page-size negotiation #692

Description

@Kingsman-99

Description

src/horizonPaginator.ts uses a fixed page size for all Horizon queries. When the configured page size exceeds the server's maximum, Horizon silently returns fewer records, causing the paginator to stop early. The paginator should detect and adapt to the server's actual page size from the first response.

Acceptance Criteria

  • On the first page response, the paginator checks the actual number of records returned
  • If fewer records are returned than requested, effectivePageSize is updated to the actual count
  • Subsequent pages use effectivePageSize to determine when a page is the last one
  • Unit tests pass

Context

  • Target file: src/horizonPaginator.ts
  • effectivePageSize should be exposed as a read-only property for debugging

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions