Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Add support for wp-graphql-offset-pagination #8

Open
daltonrooney opened this issue Apr 17, 2020 · 2 comments
Open

Add support for wp-graphql-offset-pagination #8

daltonrooney opened this issue Apr 17, 2020 · 2 comments

Comments

@daltonrooney
Copy link

Is your feature request related to a problem? Please describe.
We're using wp-graphql-offset-pagination on our main query to provide a total count of returned objects. Our pagination component looks like

[ < Previous ] Page 2 of 4 [ Next > ]

and we can't calculate the "Page 2 of 4" without knowing the total number of results.

Describe the solution you'd like
It would be great if searchWP queries could support the offsetPagination input and state. Not sure how feasible that is or what it would take to make them compatible.

Describe alternatives you've considered
For now we're not displaying the total count for searchWP queries.

@kidunot89
Copy link
Contributor

@daltonrooney Sorry, for the late response. It's simply not possible because wp-graphql-offset-pagination is design for the post-type object connections. I'll look into potentially adding the total as a connection field.

@marco910
Copy link

marco910 commented May 5, 2022

@kidunot89 Any updates on this? Would be great to have some features of wp-graphql-offset-pagination available.

Or do you know a way how to work with an offset and limit value in queries?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants