Skip to content

Add limit, cursor, and pagination support to conversationsMembers - #160

Merged
rjmholt merged 2 commits into
masterfrom
rjmholt/add-members-limit-cursor
Apr 3, 2026
Merged

Add limit, cursor, and pagination support to conversationsMembers#160
rjmholt merged 2 commits into
masterfrom
rjmholt/add-members-limit-cursor

Conversation

@rjmholt

@rjmholt rjmholt commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Ok this should be my last PR here — I just needed to add limit/cursor fields to the API!

  • Adds optional limit and cursor fields to MembersReq for controlling page size and cursor-based pagination
  • Adds ResponseMetadata to MembersRsp to expose the next cursor
  • Implements PagedRequest and PagedResponse instances for use with the existing pager infrastructure
  • Adds mkMembersReq smart constructor with defaults
  • Updates golden test to include the response metadata

Motivation

The previous MembersReq only accepted a channel ID, so Slack's default page size (100) was always used and there was no way to paginate through larger channels. This change enables callers to request up to 1000 members per page and iterate through all members using cursors.

Test plan

  • cabal build passes
  • All 83 existing tests pass
  • Golden test updated for new MembersRsp shape

Made with Cursor

rjmholt added 2 commits April 3, 2026 06:27
MembersReq now accepts optional limit and cursor fields, and MembersRsp
includes ResponseMetadata for cursor-based pagination. PagedRequest and
PagedResponse instances are provided for use with the existing pager
infrastructure. A mkMembersReq smart constructor provides convenient
defaults.

Made-with: Cursor
Verifies that the new limit and cursor fields on MembersReq are
correctly parsed from JSON.

Made-with: Cursor
@rjmholt
rjmholt requested review from ldub and lf- April 3, 2026 15:40
@rjmholt
rjmholt merged commit 49363ee into master Apr 3, 2026
6 checks passed
@rjmholt
rjmholt deleted the rjmholt/add-members-limit-cursor branch April 3, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants