NEW! WPGraphQL for Advanced Custom Fields

Interact with ACF Field data using GraphQL Queries

WPGraphQL Updates – October 23, 2019

This week no attendees were able to join the Zoom call, so there is no recording. Instead, I recapped some things happening with WPGraphQL in Slack. Below are the notes shared in Slack.

Prepping Release v0.4.0

This release is centered around making testing, specifically the testing of extensions, easier. The current WPGraphQL makes use of a lot of static methods and that makes testing extensions very difficult. This release refactors a lot of internals to drastically reduce the amount of static methods being used and makes it much easier for extending plugins to test.

For users that are using WPGraphQL with no extensions, there will likely be no disruption. However, if you’re using any plugins (or custom code) that extend WPGraphQL, there’s a chance you may need to make some code changes to remain compatible. If you’re calling static methods of the TypeRegistry or Types class directly, there’s a chance your uses of those methods will no longer work. If you run into issues and the below upgrade guide doesn’t help resolve it, please post an issue in Github and I’ll do my best to help point you to a solution to get your code compatible.

If you need to access methods from the TypeRegistry, the TypeRegistry class is now passed down to the graphql_register_types action, so you can access things from the TypeRegistry from the context of that hook.

For example:

$type_registry = TypeRegistry::get_type( 'Post' );

Would need to change to:

dd_action( 'graphql_register_types', function(  
$type_registry ) {
  
  $post_type = $type_registry->get_type( 'Post' );
} );

If you were already using the register_graphql_* APIs, they should be backward compatible, but please let me know if you do run into issues that you cannot resolve with this update.

Updating Extension Plugins

The v0.4.0 had the potential to break extension plugins, so I did a sweep of the WPGraphQL Extension plugins that I maintain, and updated them to make sure they play nice with WPGraphQL v0.4.0.

When WPGraphQL v0.4.0 is released, I will simultaneously release updates for the following extensions:

New Docs Site in the works

Shortly after the release of WPGraphQL v0.4.0 we’ll have a new docs site. Tyler Barnes is hard at work getting the docs updated to make use of the same Gatsby theme the Apollo Docs are on. This will allow us to take advantage of some nice features they add upstream and we can focus on the content.

Once the transition to the new Gatsby theme for the docs is complete, We’ll be working on adding a new “Recipes” section and filling in some missing documentation for the register_graphql_* APIs, among other improvements.

The docs site will also be moving into the main repo so that the docs can be coupled more tightly to the version of the codebase they represent.

This way, if a feature changes something that should be documented, we can ensure we merge PRs that also have relevant documentation changes.

WPGraphiQL Code Exporter

Recently merged the Code Exporter feature to WPGraphiQL.

Desert GraphQL Meetup and WordCamp US

I’ll be presenting at the Desert GraphQL Meetup on Tuesday, October 29, and will be flying out Thursday, October 31 for WordCamp US where I’ll be co-presenting with Muhammad Muhsin.

If you will be at WordCamp US, please let me know as I’d love to connect!

Share on facebook
Facebook
Share on google
Google+
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on pinterest
Pinterest

Leave a Reply

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