GraphQL Support

There’s tremendous forward momentum within the WP community surrounding GraphQL vs REST. I, for one, would welcome such an addition within Local.

Perhaps this should be part of a larger discussion about automatically installing composer, supporting custom WP filesystem structures, SPAs, etc. but thought I’d leave the request anyway.

How to support? Automatic install of https://github.com/webonyx/graphql-php and/or https://github.com/ivome/graphql-relay-php/ or similar; documentation about REST vs GraphQL and working with them locally via Local; things like that.

I know that this is a very old topic and the landscape has changed considerably (headless is even more center-stage, and there’s the WPGraphQL plugin for WordPress. I’m trying to clean-up old topics and either advocate for them internally, or close them out.

In the case of this feature request, are you mostly wanting a way for Local to scaffold out a WordPress site that has GraphQL configured with the aim of the site being a “headless WP site”?

Or are you thinking more along the lines of Local haveing a GraphQL endpoint so that you can control Local remotely?

In the first case, the Atlas Add-on helps you quickly create a Headless WordPress site which includes a few plugins and settings for the WP backend, along with a client-side JS app: