Skip to content

Implement Pagination Helper (Cursor or Offset) for List Endpoints #39

@thlpkee20-wq

Description

@thlpkee20-wq

Description
Add a reusable pagination helper (e.g. parse limit/offset or cursor from query, return nextCursor and page metadata) so list endpoints can use a consistent pagination contract.

Requirements and context

  • Implement only in new files. Add src/lib/pagination.ts (or src/middleware/pagination.ts). Do not modify package.json, src/index.ts, or existing route files. Expose helpers like parsePagination(req), formatPage(data, total, cursor) so that routes can adopt in separate PRs.

Suggested execution

  • Branch: git checkout -b feature/pagination-helper
  • Add pagination util and unit tests. Example commit message: feat(lib): add pagination helper for list endpoints

Guidelines

  • Only new lib file. Timeframe: 96 hours.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions