Getting GraphQL Relay cursor pagination to work

Greetings, I'm trying to get the pagination to work but ran into a few issues.

  1. If I try to use table.nextAfterCursor, it returns an error:
    Dependency Cycle Found: getCampBuddies.data -> getCampBuddies.graphQLVariables -> campBuddiesList.nextAfterCursor -> getCampBuddies.data

Our query and result data looks like this:

query getCampBuddies ($after: String, $first: Int!, $input: GetCampBuddiesInput!) {
    getCampBuddies (after: $after, first: $first, input: $input) {
        edges {
            cursor
            node {
                id
                createdAt
                lastAttendedAt
                ...
            }
        }
        pageInfo {
            hasNextPage
            hasPreviousPage
        }
    }
}

Here's how things look like in UI:


Our query response follows the Relay cursor spec, and I've configured the cursor just like the example in Retool docs here.

Or am I missing something here?

  1. table.afterCursor is not populated despite setting it after selecting cursor based pagination.
    This is more of a bug report, rather than what I need.


Hey @harfangk!

Happy to help here! Are you currently deployed on-premise or on cloud? I was able to track down an example of GraphQL relay cursor-based pagination on our cloud deployment without this error. If you're on-premise, what version of Retool are you currently running? Also, outside of this error, does the pagination seem to be working as expected?

Hey,

We're currently on cloud so the version issue would be moot.

The API works fine on its own, just not in conjunction with Retool table because of that circular dependency issue!