-
-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Total count when paginating #365
Comments
@PaperPlaneSoftware you should check this comment for the reasoning of omitting |
@jacobarriola thanks for the quick reply. I read this article forward and backward pagination with wpgraphql by @jasonbahl and while I don't completely agree with it (I think there are times when knowing the total number of posts is useful, especially if there are only a few 10's of posts) I can understand why the decision was made. I think it would be better if the decision for page based vs cursor based pagination was left to the developer using WPGraphQL. Is there a recommended way to do page based pagination? I guess I would have to extend the resolver somehow? Any pointers would be very much appreciated. Cheers |
Perhaps this extension can be a good guide: https://github.com/darylldoyle/wp-graphql-offset-pagination There's also this one that exposes the |
That's perfect! I guess I did have the choice all along just didn't know about that plugin. Thanks so much. |
I may be misunderstanding how pagination works but shouldn't there be a
totalCount
when requesting products so I know how many buttons to render for pagination?The text was updated successfully, but these errors were encountered: