Global Feed SDK Pagination

The global feed FeedRepository.queryGlobalFeed doesn’t seem to have the pagination functions that the other query functions do. onNextPage, hasNextPage are always undefined.

How should I paginate this feed?

1 Like

Hello @BenGannaway , For queryGlobalFeed, pagination works via the queryToken. If there’s more data, a token will be returned in the response. You can use it like this:

 const data = await FeedRepository.queryGlobalFeed({ limit: 10, queryToken: 'xxxx'});

Hi,

For me it seems like it always returns the “next” token, but eventually calling that returns the beginning of the feed again. Am I misunderstading something? It works ok initially.

Is this documented anywhere?

In fact I can see that the last “next” token it generates is the same as the “previous” token from page 2 so it makes sense that it loads page one again. How should I handle this?

Hello @BenGannaway , For this issue, we suggest you double-check the tokens, as sometimes the “next” and “previous” tokens can appear similar but are not exactly the same. If you find that the tokens are truly identical in your case, please share your request payload with us so we can investigate further.

Let us know if you need any more assistance!