5
votes

I am using graph api to get users of an organization. To implement pagination i used $top parameter which also gave me @odata.nextLink to get next page. No I want previous page when user click on Previous button. I tried using $skip, $previous-page=true parameters but did not work. Links I have used are

Please help me to redirect to previous page.

1

1 Answers

6
votes

This isn't supported, nor is it what paging was intended for. Pagination is a performance optimization that works by reducing the amount of data transmitted with each call to the API. It is not designed to directly back a UI.

Your app should be pulling down the data as needed and caching it. When the user moves forward, you fetch data from the API. When the user moves backward, you fetch data from your cache.