{"id":21178807,"url":"https://github.com/valu-digital/wp-graphql-offset-pagination","last_synced_at":"2025-04-06T20:08:09.817Z","repository":{"id":45250163,"uuid":"236747809","full_name":"valu-digital/wp-graphql-offset-pagination","owner":"valu-digital","description":"Adds traditional offset pagination support to WPGraphQL","archived":false,"fork":false,"pushed_at":"2025-03-21T12:03:34.000Z","size":217,"stargazers_count":76,"open_issues_count":6,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T19:09:03.613Z","etag":null,"topics":["wordpress-plugin","wp-graphql"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valu-digital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-28T13:59:53.000Z","updated_at":"2025-03-21T10:53:16.000Z","dependencies_parsed_at":"2024-06-19T13:26:34.123Z","dependency_job_id":"c4ea4805-50b2-405a-8bcf-84dd23b6b0a0","html_url":"https://github.com/valu-digital/wp-graphql-offset-pagination","commit_stats":{"total_commits":80,"total_committers":5,"mean_commits":16.0,"dds":"0.050000000000000044","last_synced_commit":"ce1ecfc948787618dbe9b4fb3bdc0ee973565b11"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valu-digital%2Fwp-graphql-offset-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valu-digital%2Fwp-graphql-offset-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valu-digital%2Fwp-graphql-offset-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valu-digital%2Fwp-graphql-offset-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valu-digital","download_url":"https://codeload.github.com/valu-digital/wp-graphql-offset-pagination/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543587,"owners_count":20955865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wordpress-plugin","wp-graphql"],"created_at":"2024-11-20T17:26:34.517Z","updated_at":"2025-04-06T20:08:09.791Z","avatar_url":"https://github.com/valu-digital.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wp-graphql-offset-pagination\n\nAdds traditional offset pagination support to WPGraphQL. This is useful only\nwhen you need to implement:\n\n-   Numbered links to the \"pages\"\n-   Ordering with custom SQL\n    -   Read the [tutorial](docs/tutorial.md)\n    -   You should read it even if don't plan to use this plugin as it teaches\n        you a lot about WPGraphQL internals!\n\n**You should not use this plugin if you can avoid it.** The cursors in the\nwp-graphql core are faster and more efficient although this plugin should perform\ncomparatively to a traditional WordPress pagination implementation.\n\nThis plugin implements offset pagination for post object (build-in and custom\nones), content nodes and user connections. This means there's no WooCommerce for example\nbut checkout [this issue](https://github.com/valu-digital/wp-graphql-offset-pagination/issues/1) if you are interested in one.\n\nPRs welcome for term connections. See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n\n\n## Usage\n\n```graphql\nquery Posts {\n    posts(where: { offsetPagination: { size: 10, offset: 10 } }) {\n        pageInfo {\n            offsetPagination {\n                # Boolean whether there are more nodes in this connection.\n                # Eg. you can increment offset to get more nodes.\n                # Use this to implement \"fetch more\" buttons etc.\n                hasMore\n\n                # True when there are previous nodes\n                # Eg. you can decrement offset to get previous nodes.\n                hasPrevious\n\n                # Get the total node count in the connection. Using this\n                # field activates total calculations which will make your\n                # queries slower. Use with caution.\n                total\n            }\n        }\n        nodes {\n            title\n        }\n    }\n}\n```\n\nThe where argument is the same for `contentNodes` and `users`.\n\n## Installation\n\nUse must have WPGraphQL v0.8.4 or later installed.\n\nIf you use composer you can install it from Packagist\n\n    composer require valu/wp-graphql-offset-pagination\n\nOtherwise you can clone it from Github to your plugins using the stable branch\n\n    cd wp-content/plugins\n    git clone --branch stable https://github.com/valu-digital/wp-graphql-offset-pagination.git\n\n## Prior Art\n\nThis a reimplementation of [darylldoyle/wp-graphql-offset-pagination][] by\nDaryll Doyle. The API is bit different but this one has unit\u0026integration\ntests and support for latest WPGraphQL.\n\n[darylldoyle/wp-graphql-offset-pagination]: https://github.com/darylldoyle/wp-graphql-offset-pagination\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalu-digital%2Fwp-graphql-offset-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalu-digital%2Fwp-graphql-offset-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalu-digital%2Fwp-graphql-offset-pagination/lists"}