Over the weekend, I put some time in getting a WPGraphQL starter together for Gatsby. I’d noticed the other WordPress starters were based on the gatsby-source-wordpress plugin, and not the using gatsby-source-graphql or the WP GraphQL plugin… Bummer!
Also, I noticed there wasn't a tutorial for this. I'd like to write up a tutorial for sourcing from WordPress using WP GraphQL. Currently, I believe, there's just this tutorial available.
Two ways I thought of doing this:
gatsby-source-wordpress plugin. This would be great to have for folks wanting to specifically to work with WP GraphQL on their Gatsby site.
Let me know if this would be a good addition to the docs and how I should go about adding it.
Thank you!
Nate
Hey @n8finch, thanks for opening this issue! We definitely want to include more up-to-date learning materials for using WordPress with Gatsby. There are a ton of improvements being made internally for this, so I'll ping @jasonbahl and @TylerBarnes who will have the most context. I can add that updating WordPress docs is on our radar, but we would still welcome your tutorial contribution!
Hi @n8finch , thanks for your interest in doing this! We're getting ready to launch a new major version of gatsby-source-wordpress within the next few months. The new version is a full rewrite using WPGraphQL instead of the REST API. You can use it now actually :) we're currently directing people towards using that instead of gatsby-source-graphql. It's still in an alpha state, but many are using it in production now without issues. You can find it at https://www.npmjs.com/package/gatsby-source-wordpress-experimental
Of the people I've talked to that have converted their starters from gatsby-source-graphql to the new plugin, everyone has said the transition is very easy. One of the biggest benefits of this new plugin is that it uses the Gatsby node model which allows things like Gatsby Preview and (when it's released) incremental builds to work.
Because we're in this in-between state, I'm not sure if a new tutorial on gatsby-source-graphql will be useful since we want people to try the new plugin. @jasonbahl I'm curious what you think.
@TylerBarnes sounds great! I'm happy to wait until things solidify a little more, but I'll go ahead and test out the alpha of the new gatsby-source-wordpress plugin. Great feature list!🤤...
Awesome, thanks @n8finch , I'd love to hear what you think about it!
If you're into it, there's a great community on the WPGraphQL slack! I hang out in the #gatsby channel and help out anyone who has issues with the new alpha. But you can open issues here too if you prefer.
Thanks @TylerBarnes ! I'll follow up with you on Slack if I have any questions. Cheers!
Just curious how close to release gatsby-source-wordpress-experimental is?
@Kallirroi we're moving it into beta within the next couple weeks. The plan was to have a release candidate by the end of this month but a few things delayed it. I'd like to be in beta for a while to have a chance to catch any major bugs so it will likely be a month or two longer until it starts being published on gatsby-source-wordpress@v4.