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
Additional Notes
Do not duplicate the existing admin authentication issue. This issue is specifically about scalable listing behaviour.
Summary
Add pagination to the community member listing endpoint so large communities can be queried safely and predictably.
Current Behaviour
listMembersForAdminloads 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/membersshould support pagination parameters and return metadata that lets clients request the next page.Suggested Implementation
Add query parameters such as
limit,cursororoffset, androle. Push role filtering into Prisma queries where practical. Return a response shape that includesmembers,limit, and eithernextCursoror pagination metadata.Files or Areas Likely Affected
apps/access-api/src/routes.tsapps/access-api/src/services/memberService.tspackages/shared-types/src/index.tspackages/sdk-lite/src/index.tsapps/access-api/src/**/*.test.tsREADME.mdAcceptance Criteria
limitparameterAdditional Notes
Do not duplicate the existing admin authentication issue. This issue is specifically about scalable listing behaviour.