Petra
AI assistant for GrootMade
Hi! I'm Petra 👋 Ask me to help you find the perfect WP plugin, theme, or template kit.
forked from Total Counts for WPGraphQL™
GraphSync Analytics is not affiliated with Total Counts for WPGraphQL. The name and any related trademarks are used solely for nominative descriptive purposes.
This plugin extends GraphQL for content management systems by adding a total count field to pagination data. It is designed for developers who need accurate post totals for building paginated interfaces or analytics dashboards. The tool solves a specific limitation where GraphQL queries return paginated results but lack the total item count.
Total field in pageInfo: Adds a total field directly within the pageInfo object of a GraphQL response, making the count accessible alongside standard pagination fields like hasNextPage and endCursor.
Single query efficiency: Retrieves the total post count and paginated results in one GraphQL request, reducing the need for multiple queries and improving data fetching performance.
Simple implementation: Requires only a basic GraphQL query modification, asking for the total field within pageInfo, with no complex setup or configuration needed.
Performance consideration: Built to address the performance impact of counting large datasets, offering a focused solution that adds the count without overhauling the entire GraphQL structure.
Open for contributions: The code is available for community improvements, as the initial build was quick and may have areas for optimization or extension.
Version
Original
Updated