Skip to content

Conversation

PhillipTr01
Copy link

@PhillipTr01 PhillipTr01 commented Aug 8, 2025

Changes

Based on the documentation it is possible to use the Query Parameters q, take and from for checkpoint based pagination. The problem was that the library doesn't support this yet. The next value won't be set. Overriding the existing constructor with one that sets the next parameter fixes this.

Testing

There is currently no test suite for checking if pagination is working. Manual Testing is possible by creating a ExtendedClientFilter (in my case i tested it with Kotlin) in your application:

class ExtendedClientFilter : ClientFilter() {
    fun withFromAndTake(
        from: String?,
        take: Int,
    ): ClientFilter {
        if (!from.isNullOrEmpty()) {
            parameters["from"] = from
        }
        parameters["take"] = take

        return this
    }
}

Calling the .clients().list() function returns the next variable in the body.

  • This change has been tested on the latest version of the platform/language

Checklist

@PhillipTr01 PhillipTr01 marked this pull request as ready for review August 8, 2025 10:09
@PhillipTr01 PhillipTr01 requested a review from a team as a code owner August 8, 2025 10:09
@tanya732
Copy link
Contributor

Hi @PhillipTr01

You’re right, currently the SDK doesn’t support checkpoint pagination properly because the next value isn’t set automatically when using q, from, and take. Overriding the constructor and extending to set those parameters manually works.

That said, there’s a minor refactoring in progress that will affect this endpoint. Once that lands, I’ll update the SDK to reflect the changes (including those related to this endpoint). I’ll keep you posted as things move forward.

Thanks again for raising the PR !!

@PhillipTr01
Copy link
Author

Hey @tanya732, are there any updates on this pull request :)?

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