* Which Category is your question related to? *
Query a list from Dynamo using graphql api generated in amplify.
* What AWS Services are you utilizing? *
dynamo, appsync
* Provide additional details e.g. code snippets *
is there a "previousToken" similar to "nextToken" when get data through app sync?
If not, what's the best practice to go to previous page? store tokens locally?
Finally, is there a way to go skip pages, for example go from page 1 to page 3?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I would like to know too.
@kaustavghosh06 can anyone help answer this pls?
I would like to know as well.... In any case I would like to know how to go back. The documentations say that when you use the nextToken, the $limit parameter acts as a a maxResults parement. Yet if I pass the nextToken and use a Limit of 20 on a entire record set of 18 records. It only returns 4.... What the heck ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Transferring this request to Amplify CLI, this would need to be handled on the CLI side first prior to Amplify JS implementation.
The way this is currently implemented (limit + nextToken) seems broken for anything except infinite scroll, and even for that you can't actually reproduce the same state on browser refresh without storing some state somewhere. You can't currently tell how many pages there are, and if you modify the list of things you're trying to paginate (i.e. by creating or removing an item) your tokens get borked and don't return proper data anymore. I tried pretty hard to get this to work, but it seems pointless unless there is a new solution for this.