Add limit, cursor, and pagination support to conversationsMembers - #160
Merged
Conversation
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
ldub
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ok this should be my last PR here — I just needed to add limit/cursor fields to the API!
limitandcursorfields toMembersReqfor controlling page size and cursor-based paginationResponseMetadatatoMembersRspto expose the next cursorPagedRequestandPagedResponseinstances for use with the existing pager infrastructuremkMembersReqsmart constructor with defaultsMotivation
The previous
MembersReqonly 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 buildpassesMembersRspshapeMade with Cursor