Pagination via the nodeByUri Query #2773
-
Is it possible to perform pagination when using the nodeByUri query? For example, if you were going to query the following URI But how do you get the second page of posts via this URI Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Did you find some workaround for this? Kinda stuck in the same situation. |
Beta Was this translation helpful? Give feedback.
-
Hey @Plinpod and @CherryGot By default WPGraphQL uses the Relay spec for pagination due to the pitfalls with offset pagination (here's a nice write up on the topic. Ideally, I'd recommending thinking your site structure (meaning what exactly is the reason to have If you're still set on using offset pagination, you can try the WPGraphQL Offset Pagination extension. |
Beta Was this translation helpful? Give feedback.
-
I did actually end up abandoning the Wordpress |
Beta Was this translation helpful? Give feedback.
Hey @Plinpod and @CherryGot
By default WPGraphQL uses the Relay spec for pagination due to the pitfalls with offset pagination (here's a nice write up on the topic.
Ideally, I'd recommending thinking your site structure (meaning what exactly is the reason to have
/page/#
as a frontend route if you're no longer stuck using monolithic CMSes that can't handle reactivity and caching as well as modern headless technologies.If you're still set on using offset pagination, you can try the WPGraphQL Offset Pagination extension.