PHPackages                             valu/wp-graphql-offset-pagination - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. valu/wp-graphql-offset-pagination

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

valu/wp-graphql-offset-pagination
=================================

Add offset pagination to wp-graphql

v0.2.1(1y ago)8497.6k↓39.1%17[4 issues](https://github.com/valu-digital/wp-graphql-offset-pagination/issues)[3 PRs](https://github.com/valu-digital/wp-graphql-offset-pagination/pulls)GPL-2.0-or-laterPHPCI failing

Since Jan 29Pushed 1y ago4 watchersCompare

[ Source](https://github.com/valu-digital/wp-graphql-offset-pagination)[ Packagist](https://packagist.org/packages/valu/wp-graphql-offset-pagination)[ RSS](/packages/valu-wp-graphql-offset-pagination/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (11)Versions (8)Used By (0)

wp-graphql-offset-pagination
============================

[](#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](docs/tutorial.md)
    - 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](https://github.com/valu-digital/wp-graphql-offset-pagination/issues/1) if you are interested in one.

PRs welcome for term connections. See [CONTRIBUTING.md](CONTRIBUTING.md).

Usage
-----

[](#usage)

```
query Posts {
    posts(where: { offsetPagination: { size: 10, offset: 10 } }) {
        pageInfo {
            offsetPagination {
                # Boolean whether there are more nodes in this connection.
                # Eg. you can increment offset to get more nodes.
                # Use this to implement "fetch more" buttons etc.
                hasMore

                # True when there are previous nodes
                # Eg. you can decrement offset to get previous nodes.
                hasPrevious

                # Get the total node count in the connection. Using this
                # field activates total calculations which will make your
                # queries slower. Use with caution.
                total
            }
        }
        nodes {
            title
        }
    }
}
```

The where argument is the same for `contentNodes` and `users`.

Installation
------------

[](#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
git clone --branch stable https://github.com/valu-digital/wp-graphql-offset-pagination.git

```

Prior Art
---------

[](#prior-art)

This a reimplementation of [darylldoyle/wp-graphql-offset-pagination](https://github.com/darylldoyle/wp-graphql-offset-pagination) by Daryll Doyle. The API is bit different but this one has unit&amp;integration tests and support for latest WPGraphQL.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~939 days

Total

3

Last Release

515d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62e64ab16d2c22b2d02dd123a85135093821bc9f7f3619f38c84227ed93427af?d=identicon)[valu](/maintainers/valu)

---

Top Contributors

[![esamattis](https://avatars.githubusercontent.com/u/225712?v=4)](https://github.com/esamattis "esamattis (80 commits)")[![jasonbahl](https://avatars.githubusercontent.com/u/1260765?v=4)](https://github.com/jasonbahl "jasonbahl (1 commits)")[![JoshuaJarman](https://avatars.githubusercontent.com/u/36280055?v=4)](https://github.com/JoshuaJarman "JoshuaJarman (1 commits)")[![MasakiNishi](https://avatars.githubusercontent.com/u/23161699?v=4)](https://github.com/MasakiNishi "MasakiNishi (1 commits)")[![mTanskanen](https://avatars.githubusercontent.com/u/77783046?v=4)](https://github.com/mTanskanen "mTanskanen (1 commits)")[![saulirajala](https://avatars.githubusercontent.com/u/5536354?v=4)](https://github.com/saulirajala "saulirajala (1 commits)")

---

Tags

wordpress-pluginwp-graphql

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/valu-wp-graphql-offset-pagination/health.svg)

```
[![Health](https://phpackages.com/badges/valu-wp-graphql-offset-pagination/health.svg)](https://phpackages.com/packages/valu-wp-graphql-offset-pagination)
```

###  Alternatives

[elfsundae/laravel-gravatar

The easiest way to generate Gravatar avatar URL.

389.0k](/packages/elfsundae-laravel-gravatar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
