Prismic & Gatsby

There has been a lot of change recently with Gatsby that has caused us to shift our strategy for supporting Gatsby websites. Here we'll outline what we recommend doing for Gatsby websites.

Deprecating the gatsby-source-prismic-graphql plugin

Our documentation for Gatsby was created around the gatsby-source-prismic-graphql plugin. We are now having certain problems with this plugin which we have discussed fully at length in this blog post. Now our current stance is that we recommend users not to build a new Prismic project with the gatsby-source-prismic-graphql plugin.

Therefore the plan in the future will be to change the documentation here from supporting this plugin.

This documentation will change in the future

For the time being, we will leave the documentation for anyone still using this plugin, but we highly suggest switching to another plugin as we won't support this plugin in the near future.

What we currently suggest

We suggest using Angelo Ashmore's gatsby-source-prismic plugin and his documentation for it on Github. As explained in the blog post:

"This plugin is once again community-created, but it doesn’t rely on GraphQL, is future-proofed for Gatsby Cloud, and we are very heavily involved in maintaining it."

Some of you might have noticed that we have a fork of this plugin on the official Prismic Github, but this was just used for creating PRs on the main Github repo. We recommend that everyone use the kit on Angelo’s Github.

Migrate to the recommended plugin

We suggest you to read this guide to learn how to migrate from gatsby-source-prismic-graphql to using Angelo Ashmore's gatsby-source-prismic plugin.

Using Prismic Previews with React

For the moment, because Prismic Previews don't fully work with Gatsby, we recommend the more stable Next.js to create Statically Generated React projects.

What is our plan for the future?

We have explained this in more detail in the blog post, but in the immediate future, our team will perform a proof of concept with another approach Gatsby recommended.
Depending on the outcome of that we will know if we will either create our own in-house Gatsby plugin or to invest further in Angelo’s plugin. Once this is clearer for us we will begin planning our new Gatsby documentation based around this.

Hopefully this makes things clearer. We share your frustration in what’s happening, but like we said before this has been a huge learning process for us and fingers crossed things will be a lot smoother in the future if we are ever in the same position.