WPGraphQL

Description

WPGraphQL is a free, open-source WordPress plugin that provides an extendable GraphQL schema and API for any WordPress site.

Below are some links to help you get started with WPGraphQL

Build rich JavaScript applications with WordPress and GraphQL

WPGraphQL allows you to separate your CMS from your presentation layer. Content creators can use the CMS they know, while developers can use the frameworks and tools they love.

WPGraphQL works great with:

Query what you need. Get exactly that.

With GraphQL, the client makes declarative queries, asking for the exact data needed, and in exactly what was asked for is given in response, nothing more. This allows the client have control over their application, and allows the GraphQL server to perform more efficiently by only fetching the resources requested.

Fetch many resources in a single request.

GraphQL queries allow access to multiple root resources, and also smoothly follow references between connected resources. While typical a REST API would require round-trip requests to many endpoints, GraphQL APIs can get all the data your app needs in a single request. Apps using GraphQL can be quick even on slow mobile network connections.

Powerful Debugging Tools

WPGraphQL ships with GraphiQL in your WordPress dashboard, allowing you to browse your site’s GraphQL Schema and test Queries and Mutations.

Upgrading

It is recommended that anytime you want to update WPGraphQL that you get familiar with what’s changed in the release.

WPGraphQL publishes release notes on Github.

WPGraphQL has been following Semver practices for a few years. We will continue to follow Semver and let version numbers communicate meaning. The summary of Semver versioning is as follows:

  • MAJOR version when you make incompatible API changes,
  • MINOR version when you add functionality in a backwards compatible manner, and
  • PATCH version when you make backwards compatible bug fixes.

You can read more about the details of Semver at semver.org

Screenshots

FAQ

Can I use WPGraphQL with xx JavaScript Framework?

WPGraphQL turns your WordPress site into a GraphQL API. Any client that can make http requests to the GraphQL endpoint can be used to interact with WPGraphQL.

Where do I get WPGraphQL Swag?

WPGraphQL Swag is available on the Gatsby Swag store.

What’s the relationship between Gatsby and WPGraphQL?

Gatsby employs Jason Bahl, the creator and maintainer of WPGraphQL. Gatsby believes that a strong GraphQL API for WordPress is a benefit for the web. Gatsby makes no restrictions on how you use WPGraphQL, however Gatsby is investing a lot into making the Gatsby + WordPress experience a great one, and WPGraphQL is a central part of that experience.

Reviews

December 2, 2020
Trying to work with the WordPress API after a client switched from contentful was a stressful mess. They loved using WordPress but the API made creating a flexible JAMstack site with it difficult. That was until I found WPGraphQL. After that point my API issues where solved. Everything was logical and easy to access. It makes huge improvements instead of just wrapping the rest API with a graphql layer. I stopped worrying about my API and focused on making the best site I could.
November 24, 2020
Exposing WordPress data in a GraphQL API has been a game changer. Now if I run a decoupled or native app and need data that lives in a WordPress site, it's available. Besides that, the WPGraphQL team is very supportive and is constantly improving the API.
November 23, 2020
WordPress in its core is a one-of-a-kind CMS. We love the capabilities of WP and have grown fond of its many features and APIs. But outside of WordPress as a monolithic CMS, there is a world of opportunities we can imagine – to use WordPress as a Headless CMS. For example, WordPress can power an advanced native mobile application or act as a content source for a 3D game. I strongly believe GraphQL is a game-changer as a query language to fetch data remotely. Adding GraphQL to the CMS we have gotten accustomed to is, in many ways, adding a different dimension to WordPress. Apart from the applications, we can imagine, I can also imagine a whole new level of developer adoption for WordPress, thanks to this plugin. I have been following the development of this plugin since WCUS 2017, and I can vouch Jason has done an incredible job building this plugin. He deserves a lot of credit for shaping the landscape of modern WordPress development. We cannot deny the clear benefits GraphQL brings to WordPress. I wish this plugin and its developers and adopters all the success!
November 19, 2020
Vastly superior to traditional REST API, giving a developer the ability to write queries on the fly as opposed to REST where endpoints need to be created. Dev Docs are friendly and well written out. A must try for any developer worth their salt.
November 17, 2020
I love using WP as a CMS, but I prefer using a modern tech stack of React and GraphQL to build websites. This plugin enables me to do this, and makes WordPress a viable part of my web development toolkit again. Thank you, WPGraphQL!! 🙏
November 17, 2020
I love using this plugin to connect my WordPress site with my new Gatsby site. I've been using it on multiple sites and it works great. The support is great and makes my life easier connecting sites together.
Read all 31 reviews

Contributors & Developers

“WPGraphQL” is open source software. The following people have contributed to this plugin.

Contributors

Translate “WPGraphQL” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

See Release Notes