WPGraphQL Documentation

website·Indexed 36 days ago

https://acf.wpgraphql.com

Technical reference for WPGraphQL filters and hooks, providing detailed documentation on PHP filters used for customizing GraphQL queries, data loaders, query analysis, and connection resolvers within WordPress.

Tokens
227.2K
Snippets
899
Records
1.7K
Agent score
63%

What's inside WPGraphQL

  1. Overview of WPGraphQL IDE features and requirements

    WPGraphQL IDE is a WordPress plugin providing a modern GraphQL query editor. It requires the WPGraphQL core plugin to function. It can be accessed as a slide-up drawer from any admin page or as a dedicated full-page editor. It can also be configured to expose a public, unauthenticated endpoint for headless developers. While it integrates with WPGraphQL Smart Cache for persisted documents, it functions as a standalone GraphQL client (providing editor, schema, execution, response panes, history, and preferences) even if Smart Cache is inactive.
  2. Overview of WPGraphQL Content Blocks

    WPGraphQL Content Blocks is a free plugin developed by QZ.com that allows developers to query HTML content from WordPress Posts and Pages as structured "Blocks". This provides a way to bring more structure to queried content, independent of the Gutenberg block editor.
  3. Overview of integrating custom database tables with WPGraphQL

    WPGraphQL automatically generates the GraphQL Schema based on core WordPress registries (like Post Types and Taxonomies). Because WordPress lacks a formal 'Custom Database Registry', data in custom MySQL tables is not automatically exposed. To integrate this data, developers must manually register new Node Types and Root Connections, and implement custom Connection Resolvers and Data Loaders to fetch the data.
  4. Overview of WPGraphQL

    WPGraphQL is a free, open-source WordPress plugin that provides an extendable GraphQL schema and API for any WordPress site. It allows developers to interact with WordPress data using the GraphQL query language instead of the standard REST API.
  5. Overview of WPGraphQL IDE

    WPGraphQL IDE is a free, open-source (GPL-3.0) schema-aware GraphQL client that lives inside the WordPress admin (wp-admin). It allows developers to explore the GraphQL schema, build and debug queries, and test authenticated requests without needing external tooling. It requires the WPGraphQL plugin to function.
  6. Overview of WPGraphQL Network Cache

    WPGraphQL Network Cache works by utilizing a host's network caching layer (e.g., Varnish) to cache GraphQL responses. When a query is made via an HTTP GET request, the response is cached and tagged using the x-graphql-keys header. Subsequent identical requests are served directly from the cache, bypassing the WordPress application entirely. When content is updated, published, or deleted in WordPress, the plugin triggers a purge() call for the relevant tags, evicting the outdated documents from the network cache.
  7. Overview of WPGraphQL Smart Cache

    WPGraphQL Smart Cache is a free, open-source plugin (GPL-2.0) that requires WPGraphQL. It enables aggressive caching of GraphQL queries with precise invalidation to prevent stale data. It uses tag-aware caching where responses are tagged with the IDs of the nodes and lists they touch (via WPGraphQL's Query Analyzer), allowing responses to be cached at the network/edge layer and evicted immediately when the underlying data changes.
  8. Overview of WPGraphQL and its ecosystem

    WPGraphQL is a core plugin that provides a GraphQL schema and API for WordPress sites. It is supported by a family of first-party extensions that expand its functionality, including support for Advanced Custom Fields (ACF), response caching, and an enhanced IDE for the WordPress admin area.
  9. Overview of WooGraphQL for WooCommerce

    WooGraphQL is an extension plugin that integrates WooCommerce with WPGraphQL. It enables headless e-commerce development, allowing developers to build scalable and flexible online stores by exposing WooCommerce data and functionality via a GraphQL API.
  10. Overview of GraphQL

    GraphQL is an open-source data query and manipulation language for APIs, as well as a runtime for fulfilling queries using existing data. It was developed by Facebook in 2012 and released publicly in 2015.
  11. Overview of Persisted Queries in WPGraphQL Smart Cache

    Persisted Queries allow GraphQL query documents to be stored on the server and referenced by a unique Query ID (or Alias Name) instead of sending the full query string with every request. This reduces upload costs, avoids query string length limits, and enables granular control over cache expiration and execution permissions. WPGraphQL Smart Cache is compatible with the Apollo Persisted Query Link.
  12. Choose an authentication method for WPGraphQL

    WPGraphQL does not have built-in authentication; it relies on extension plugins. Depending on your use case, choose one of the following solutions:

    1. Cookie-based Authentication: Built into WordPress. Best for admin-context applications (e.g., WPGraphiQL IDE) and same-origin requests. Requires nonce handling.
    2. WPGraphQL Headless Login: A comprehensive solution supporting WordPress credentials, OAuth2/OpenID Connect, JWT, and Application Passwords.
    3. WPGraphQL JWT Authentication: A lightweight JWT-based solution ideal for cross-origin requests.
    4. WordPress Application Passwords: Built into WordPress core (5.6+). Best for server-to-server authentication, though WPGraphQL support is currently limited.