Skip to content

Add parsePaginationQuery pure helper #331

Description

@CemAyyildiz

Goal

Create a pure function to safely parse limit and offset query params.

Context

server-mvp.ts uses parseInt on query strings; invalid values can become NaN.

Acceptance criteria

  • New backend/src/utils/parse-pagination.ts + tests
  • Clamps max limit (e.g. 100), floors offset at 0
  • No server wiring in this PR

Out of scope

  • Cursor pagination
  • Changing live endpoint defaults

Conflict rule

New files only.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions