WPGraphQL Project Gains Momentum with Growing Library of Extensions for Popular WordPress Projects

The WPGraphQL project, a plugin that provides an extendable GraphQL schema and API for WordPress sites, has been gaining momentum over the past several months. Creator and maintainer Jason Bahl put the project up on Open Collective last week after people frequently asked how the community can support the project. WPGraphQL already has five backers, an $800 balance, and an estimated annual budget of $2,687.

“Large well-known sites such as qz.com and theplayerstribune.com are in production with JavaScript front-ends that consume data from WordPress via WPGraphQL,” Bahl said. “PostLight Studio maintains a popular “Headless WP Starter” project that initially started as a React + REST API boilerplate, but recently added WPGraphQL support as well.”

One of the most important signs of the project’s growth are the extensions that developers are building on top of it, such as WPGraphQL for Yoast SEO, WPGraphQL for Gutenberg, and WPGraphQL Content Blocks. WPGraphQL for Advanced Custom Fields is getting very close to an initial release and Caldera Forms is also exploring integrations with WPGraphQL.

“The two most-searched things on WPGraphQL.com are “Advanced Custom Fields” and “WooCommerce,” Bahl said. “People are interested in using WPGraphQL with other popular WordPress projects, and WPGraphQL for WooCommerce is a reaction to the folks that are already looking for alternatives to the WooCommerce REST API.”

WPGraphQL for WooCommerce Seeks $15K in Funding

WPGraphQL for WooCommerce is an extension created by Geoffry Taylor that has started to gain some traction. Taylor is a core contributor to the main WPGraphQL plugin. He has just published a Kickstarter to help fund development of the extension and Bahl is consulting with him on implementation details and code reviews.

Taylor began contributing to the WPGraphQL project last year after discovering the repository and finding that it lacked the features he needed.

“I was looking for a solution that would allow me to create React-Apollo JS apps that could be used as WordPress themes,” he said. “And the solution couldn’t rely on a node server, because a large portion of my clients use shared hosting. WPGraphQL was a perfect fit for what I needed, but it lacked the features I needed at the time. This led to me contributing.”

Since then Taylor has also created other libraries and tools that work directly or indirectly with WPGraphQL, such as WPGraphQL Composer, a React-Apollo component library, and Oil-Based Boilerplate, a boilerplate for developing React-powered WordPress themes, plugins, and guten-blocks that use shared components.

Taylor is seeking $15K in funding for development of the WPGraphQL WooCommerce extension, which would enable him to apply 100% of his time to the project.

“The question I think a lot of people have, is what does this extension provide that WPGraphQL and WooCommerce doesn’t already?” Taylor said. “It adds WooCommerce support to the WPGraphQL server. It is being designed to match and increase the functionality of WooCommerce REST to make it as easy as possible to convert your app from the WooCommerce REST API.”

Taylor said the extension is past the initial explorations and is well into development. If a developer follows the instructions in the README they will be able to query products and their variations, coupons, orders, refunds, customer information, and (after the next update), order items from the WPGraphQL endpoint. He said that with the exception of products, none of the data is queryable for any user without shop-manager level capabilities.

“Customer-level functionality is the target goal right now, meaning customers can register/login, update the cart, and checkout,” Taylor said.

Anyone interested can follow the project’s progress on GitHub or get involved on Slack at wp-graphql.slack.com in the #woocommerce channel.

Would you like to write for WP Tavern? We are always accepting guest posts from the community and are looking for new contributors. Get in touch with us and let's discuss your ideas.

5 Comments


  1. It’s great to see WPGraphQL getting the attention it deserves!
    I love the project and the idea behind: making WordPress viable for a fast headless CMS/e-commerce solution.

    I really hope WPGraphQL devs will team up with Vue Storefront devs (a great PWA e-commerce frontend) to make a fast and beautiful headless WooCommerce site… am I dreaming too much? 😜

    Report

    Reply

    1. The same advantages you get from a GraphQL endpoint over REST. You FETCHing becomes succinct. In other words, you don’t over/under fetch data.

      A made of example. Let’s say you’re rendering a Post with the WP REST API. You might need:

      1) The menu
      2) The post_content
      3) Rich user meta (that doesn’t get returned in the post endpoint)

      To do so with the WP REST API you’d likely make 3 REST requests. One for each of the above. Furthermore, those REST requests would return a bunch of data that you ver likely may not use.

      Enter GraphQL. GQL let’s you define schemas and at the end of the day, through some pretty simple Query syntax, you could query for your menu, post_content and user meta in one request that contains exactly what you need. No more. No less.

      Report

      Reply

    2. Hey!

      WPGraphQL allows developers the ability to declaratively and efficently interact with WordPress data using the GraphQL query language.

      There are many benefits to using GraphQL, but a big one is performance. Requesting data from GraphQL allows the consumer to specify the fields needed, which allows the WordPress server to do the minimum processing needed to get the data returned to the consumer. Where in other APIs, such as REST, the server sends an entire payload of data and does all the relational queries to get connected term IDs, etc even if the consumer is only interested in the title, for example.

      There are also many features of the GraphQL Query Language, such as aliasing and query fragments that make component-based development (React, Vue, etc) much easier to manage, as the data dependencies can be handled by the component, and not be some arbitrary data layer of the client application.

      Report

      Reply

  2. This is great new for the WordPress + GraphQL community. WPGraphQL is a very useful project that deserves a lot of attention from developers and backers alike. Jason is someone who really cares about the community.

    I wish WPGrapQL all the success!

    Report

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.