Hi,
I want to use GraphQL for searching and building a listing page with pagination. As I explored, I understand that GraphQL supports offset, limit, sorting etc. but I couldn't find a way to get the total number of results to achieve pagination with page number.
It would be really helpful if anyone can suggest how can we achieve it using GraphQL.
Thanks in advance.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Thank for the reply @Rite18 .
I already had a look on these two types and these two does not gives the total count to build a pagination based on page number. For example, I want to show the page number 1-5 and if user clicks on a number, then corresponding results are fetched and displayed.
@RajeevKu Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
offset
and limit
.
Hi @RajeevKu ,
Did you got solution for this problem? Please let the community know if so, it would help others to learn from that knowledge.
If not, check this site for some idea about Pagination using GraphQL https://hygraph.com/learn/graphql/pagination?form=MG0AV3
Happy Coding,
Views
Likes
Replies