Skip to content

Shared Pagination Utility Extractor #199

@Sulex45

Description

@Sulex45

Description:
The limit, order, and cursor query parameter handling is duplicated across multiple route files. Extract this logic into a single reusable pagination utility to eliminate repetition and ensure consistent behaviour across all paginated endpoints.
Acceptance Criteria:

Utility at src/utils/pagination.js exports parsePaginationParams(query, maxLimit)
Returns validated { limit, order, cursor } object
Throws a ValidationError for invalid values
All paginated routes updated to use the utility
No behaviour changes — tests still pass

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdxDeveloper experience improvements (logging, errors, docs)mediumModerate complexity, requires some research

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions