How to integrate the loadmore functionality with graphql and next.js?

I need to develop a Loadmore functionality in list page to show all the records in DatoCMS. Which should initially load 10 records. And on clicking the Loadmore button second call will go. Which should give the remaining records in response. Not the whole 20 records. But, in UI need to show the entire 20 records. Can anyone please help to make this possible. TIA.

1 Like

Hello @thamizharasan.devaraj and welcome to the community!

What you are looking for are paginated requests: Content Delivery API - Pagination - DatoCMS Docs
There you can see how to request only 10 records per request through the first argument, and then through the skip argument how to skip those 10 requested records to request the following records, and so on as the user clicks “Load more”

Let me know if that was what you were looking for.

Yes, thanks.