
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
github.com/valu-digital/wp-graphql-offset-pagination
Adds traditional offset pagination support to WPGraphQL. This is useful only when you need to implement:
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.
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
.
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
This a reimplementation of darylldoyle/wp-graphql-offset-pagination by Daryll Doyle. The API is bit different but this one has unit&integration tests and support for latest WPGraphQL.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.