Skip to content

Add Pagination and Filtering to List Endpoints #30

@fati-Onchain

Description

@fati-Onchain

Description: The GET /users endpoint (and future list endpoints) returns all records without pagination or filtering. This will cause performance issues as data grows. Implement cursor- or offset-based pagination.

Tasks:

  • Create a shared PaginationDto with page, limit, and sortBy fields
  • Apply pagination to UsersService.findAll() using TypeORM take/skip
  • Return a paginated response envelope: { data, total, page, limit }
  • Add optional filtering (e.g., search by email) via query parameters
  • Document pagination parameters in Swagger

Acceptance Criteria:

  • List endpoints accept page and limit query params
  • Response includes total count and current page metadata
  • Default limit is enforced (e.g., max 100 records per page)

ETA: 1 day


Metadata

Metadata

Assignees

No one assigned

    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