NEW! WPGraphQL for Advanced Custom Fields

Interact with ACF Field data using GraphQL Queries

WPGraphQL for ACF is here!

Many folks using WPGraphQL have asked about how to use GraphQL with their ACF data. The answer has typically been to manually map their ACF fields to the GraphQL schema using functions like register_graphql_field and register_graphql_object_type. For a few fields, this isn’t much of an issue, but when you have dozens of fields, this gets […]

Upgrading to v0.3.0

WPGraphQL v0.3.0 is one of the most substantial releases to date for the plugin. You can read more about what was included in this release here and here. Test in Staging Environment It’s best practice to test plugin updates in staging environment, but I want to re-iterate that again here. Make sure you thoroughly test […]

What’s coming in v0.3.0?

The next release of WPGraphQL will be version v0.3.0, and is slated to be released next week. This release is arguably the most substantial release to date. It’s going to made up of 2 major features: “DataLoader” and “Model Layer“ DataLoader The role of DataLoader is to load data as efficiently as possible. You can […]

WPGraphQL at WordCamp Montreal

Étienne Bélanger gave a talk at WordCamp Montreal 2018 titled: “Your First Headless WordPress Project with ReactJS and GraphQL”. In the talk, he covers some basic differences between the WP REST API and WPGraphQL, then shows how to use React and Apollo Client to consume data from a WordPress site with the WPGraphQL plugin active. […]

WPGraphQL + Gatsby Tutorial

Zac Gordon put together a group of engineers to work on a formal project, GatsbyWPThemes.com to port popular WordPress themes to Gatsby themes. Recently, Muhammad Muhsin published a tutorial showcasing how users can create a Gatsby theme using WordPress as the CMS and WPGraphQL as the API for Gatsby to consume data from. Take a […]

Release v0.2.3

Today we released a new version of WPGraphQL, v0.2.3. The release can be found here: https://github.com/wp-graphql/wp-graphql/releases/tag/v0.2.3 Below is a recap of the release notes: Breaking Changes none New Features #676: New TimezoneEnum type added to the Schema #719: New graphql_menu_item_connection_args and graphql_menu_item_connection_query_argsfilters added to the MenuItemConnectionResolver. Thanks @epeli! Bug Fixes #714 Fixes global $post not properly being setup before resolving fields for […]

Preventing unauthenticated requests to your WPGraphQL API

Someone asked in the Slack channel how they could lock down the WPGraphQL endpoint so that only authenticated users could access it. Provided Solution What this does Below, I’ll walk through what this snippet does. Hook into the GraphQL request lifecycle This snippet hooks into the do_graphql_request action, which is fired when a GraphQL request […]

Querying Sticky Posts with GraphQL

Recently, a WPGraphQL user asked how to query only sticky posts with a GraphQL query.  One of the great things about WPGraphQL is how customizable it is with hooks and filters, making it easy to extend the API for your needs.  End goal One (of many possible) solutions would be to allow the client to specify that […]

Introducing playground.wpgraphql.com

I’ve done many presentations about the WPGraphQL plugin, and I find myself showing demos of many of the same features, so in order to streamline the demos before my presentation at the 2018 WordCamp Phoenix, I created https://playground.wpgraphql.com This site showcases examples of GraphQL Queries and Mutations on a live WordPress site with the WPGraphQL […]

New meeting schedule in the WPGraphQL slack

Over the past few weeks we have been working hard towards the stable 1.0 release of the WPGraphQL plugin. We have a plethora of issues in our backlog that we feel are necessary to resolve before the stable release. In order to try and organize our efforts a little bit better, and to make it […]