Niveau 1
Niveau 2
Se connecter à la communauté
Connectez-vous pour voir tous les badges
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.
Résolu ! Accéder à la solution.
Les sujets facilitent la catégorisation du contenu de la Communauté et vous aident à retrouver le contenu le plus pertinent.
Vues
Réponses
Nombre de J’aime
@RajeevKu then would suggest having pagination login in Java script and letting JS decide behavior based on the response object
Thank for the reply @RiteshY18 .
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 then would suggest having pagination login in Java script and letting JS decide behavior based on the response object
@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!
Vues
Réponses
Nombre de J’aime
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,
Seems not all the features of this documentation are present on AEM, since I get:
Field 'pageSize' in type 'PageInfo' is undefined"
Vues
Réponses
Nombre de J’aime
Vues
Likes
Réponses
Vues
Like
Réponses
Vues
Likes
Réponses