WPGraphQL

The official open-source GraphQL API transforming WordPress into a headless powerhouse.

WPGraphQL Screenshot Preview

WPGraphQL

The official open-source GraphQL API transforming WordPress into a headless powerhouse.


Overview

WPGraphQL provides an extensible, performant GraphQL schema for any WordPress site. Maintained in partnership with Gatsby and WP Engine, it powers modern decoupled/headless front-ends built with Next.js, Nuxt, Astro, and mobile applications.


Key Features

  • Performant GraphQL API: Query exactly the data your front-end requires in a single network request.
  • GraphiQL IDE: Interactive visual query builder integrated directly into the WordPress administrative panel.
  • Extensible Schema: Easily register custom fields, mutations, and post types into the GraphQL graph.
  • Ecosystem Plugins: Official extensions for ACF, WooCommerce (WPGraphQL for Woo), and Smart Cache.
  • Decoupled Front-Ends: The backbone of enterprise decoupled architectures deployed to Vercel, Netlify, and Cloudflare.

Code & Integration Example

// Register custom field in WPGraphQL schema
add_action( 'graphql_register_types', function() {
    register_graphql_field( 'Post', 'customReadingTime', [
        'type' => 'String',
        'description' => 'Estimated reading time',
        'resolve' => function( $post ) {
            return '5 min';
        }
    ] );
} );

Why Developers Choose WPGraphQL

WPGraphQL is the undisputed foundation of headless WordPress, modern Jamstack sites, and mobile app APIs.

  • Developer Friendly: Built to respect WordPress coding standards with action hooks and filters.
  • Actively Maintained: Frequently updated for the latest major WordPress versions.
  • Community Backed: Comprehensive documentation, tutorials, and community support forums.

WPGraphQL - Discussion

Ask questions, share configuration workflows, or leave user feedback.

Back to Developer Tools & Workflow Browse Full Archive Visit Official Site
Tip: Press ESC to exit Browse All in Master Directory →