manifest / integrations / wp-graphql-offset-pagination
WPGraphQL Offset Pagination
Add offset pagination to wp-graphql
by Esa-Matti Suuronen, Valu Digital Oy · github.com/valu-digital/wp-graphql-offset-pagination · website
★ 84stars
100kcomposer installs
17forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/valu-digital/wp-graphql-offset-pagination/archive/refs/heads/master.zipAlso on Packagist as valu/wp-graphql-offset-pagination:
composer require valu/wp-graphql-offset-paginationFrom the readme
wp-graphql-offset-pagination
Adds traditional offset pagination support to WPGraphQL. This is useful only
when you need to implement:
- Numbered links to the "pages"
- Ordering with custom SQL
- Read the tutorial
- You should read it even if don't plan to use this plugin as it teaches
you a lot about WPGraphQL internals!
You should not use this plugin if you can avoid it. The cursors in the
wp-graphql core are faster and more efficient although this plugin should perform
comparatively to a traditional WordPress pagination implementation.
This plugin implements offset pagination for post object (build-in and custom
ones), content nodes and user connections. This means there's no WooCommerce for example
but checkout this issue if you are interested in one.
PRs welcome for term connections. See CONTRIBUTING.md.
Usage
The where argument is the same for contentNodes and users.
Installation
Use must have WPGraphQL v0.8.4 or later installed.
If you use composer you can install it from Packagist
composer require valu/wp-graphql-offset-pagination
Otherwise you can clone it from Github to your plugins using the stable branch
cd wp-content/plugins
Read the full README on GitHub →