Skip to content

Add pagination to community member listing #12

@Lakes41

Description

@Lakes41

Summary

Add pagination to the community member listing endpoint so large communities can be queried safely and predictably.

Current Behaviour

listMembersForAdmin loads all members for a community and filters the role in memory. This can become slow and memory-heavy as communities grow.

Expected Behaviour

GET /v1/communities/:communityId/members should support pagination parameters and return metadata that lets clients request the next page.

Suggested Implementation

Add query parameters such as limit, cursor or offset, and role. Push role filtering into Prisma queries where practical. Return a response shape that includes members, limit, and either nextCursor or pagination metadata.

Files or Areas Likely Affected

  • apps/access-api/src/routes.ts
  • apps/access-api/src/services/memberService.ts
  • packages/shared-types/src/index.ts
  • packages/sdk-lite/src/index.ts
  • apps/access-api/src/**/*.test.ts
  • README.md

Acceptance Criteria

  • Endpoint accepts a bounded limit parameter
  • Endpoint supports deterministic pagination
  • Role filtering is applied before pagination where possible
  • Response includes pagination metadata
  • Tests cover default pagination, custom limits, role filters, and empty pages
  • README or API documentation describes the new query parameters

Additional Notes

Do not duplicate the existing admin authentication issue. This issue is specifically about scalable listing behaviour.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

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