Unlock the power of WordPress data with GraphQL
WPGraphQL provides an extendable GraphQL API for any WordPress site, unlocking modern development workflows.
Whether you're a WordPress developer exploring GraphQL or a GraphQL expert diving into WordPress, WPGraphQL simplifies data interaction and empowers your development workflow.
WPGraphQL aims to be the canonical GraphQL API for WordPress, providing:
- A complete, flexible GraphQL schema for accessing WordPress data
- Standards-based implementation following GraphQL and WordPress best practices
- An extensible foundation for plugins to build upon
- Production-ready performance suitable for high-traffic sites
- Long-term stability with semantic versioning and backward compatibility
In scope:
- GraphQL schema for WordPress core features (posts, pages, users, taxonomies, etc.)
- Performance optimizations that benefit all users
- Developer APIs for extending the schema
- Standards and patterns for the WPGraphQL ecosystem
Candidates for core (via Experiments):
- Proposed features that need real-world validation before committing
- Breaking changes that require community feedback
- Performance improvements that need testing at scale
- Learn more about Experiments β
Better as extensions:
- Plugin-specific integrations (ACF, Yoast, WooCommerce, etc.)
- Opinionated workflows or conventions
- Features specific to particular frameworks or use cases
The difference: Experiments are potential core features being validated. Extensions are intentionally separate functionality that should remain as plugins. Experiments may graduate to core or be removed; extensions live independently forever.
This focus keeps WPGraphQL maintainable while enabling a rich ecosystem of extensions.
- π¦ Install WPGraphQL:
wp plugin install wp-graphql --activate - π©βπ» Try it out: Live Demo
- π Read the Quick Start Guide.
- π¬ Join the Community on Discord
- β Star the Repo on GitHub π
- Flexible API: Access posts, pages, custom post types, taxonomies, users, and more.
- Extendable Schema: Easily add functionality with functions like
register_graphql_fieldandregister_graphql_connection.- Plugins like WPGraphQL Smart Cache, WPGraphQL for ACF and other extension plugins demonstrate the power of extendability.
- Modern Framework Integration: Works seamlessly with Next.js, Svelte, Astro and other frameworks.
- Optimized Performance: Query only the data you need. Collect multiple resources in one request, reducing round-trips. Use WPGraphQL Smart Cache for enhanced performance and network-level caching and cache-invalidation.
- Developer Tools: Explore the schema with tools like the GraphiQL IDE and WordPress Playground.
WPGraphQL is powered by a passionate community of contributors, backers, and sponsors.
Want to help maintain and grow WPGraphQL?
- Support the project on Open Collective
- Join the Community on Discord
- Contribute to the project on GitHub
We extend our gratitude to the following projects and organizations for their contributions to the WordPress and GraphQL ecosystems:
- Webonyx: For the amazing
graphql-phplibrary that powers WPGraphQL's core functionality. - Ivome: For the
graphql-relay-phplibrary used in relay connections. - Automattic: For supporting WPGraphQL's ongoing development as a canonical WordPress plugin.
- Gatsby: For their contributions to the WPGraphQL ecosystem and support for headless WordPress development.
- WPEngine: For funding early development of WPGraphQL and supporting its growth.
- Facebook: For open-sourcing the GraphQL spec, GraphiQL, and maintaining the JavaScript reference implementation.
- Apollo: For pushing GraphQL forward and inspiring schema design best practices.
- The WordPress REST API Contributors: For paving the way with the WP-API project, inspiring WPGraphQL's architecture.
Thank you to all these organizations and individuals for their efforts in shaping the tools we rely on today.
WPGraphQL is becoming a Canonical Plugin on WordPress.org, ensuring long-term support and a growing community of users and contributors.
WPGraphQL uses the Appsero SDK to collect telemetry data only after user consent, helping us improve the plugin responsibly.