Payload + Gatsby

default discord avatar
2 months ago

Hi everyone 👋🏻,

I've been playing around with Payload for a couple of weeks now, and I can see this easily being my default go-to CMS for my projects.

I was wondering if there is any plans to write an official plugin for Gatsby (

). I know it's possible to connect it to Payload's GraphQL endpoint, but this method has some important limitations, like the lack of the ability to Preview before publishing posts (pretty important for clients).


  • default discord avatar
    2 months ago
  • default discord avatar
    2 months ago

    Thanks! I stumbled upon it but there weren't any documentation. There is now.

    Any luck setting up Previews with Gatsby Cloud?

  • default discord avatar
    2 months ago

    Hey @t0m ! I'm doing previews with a page that loads a document from the Payload CMS Rest API. Then for the actual Gatsby build, it goes the normal route and builds with Gatsby GraphQL.

    I am planning to write up how I'm doing it - this plugin requires a fair amount of work to get working in the best way. For example, every time I make changes to collection/global config, I need to export the GraphQL schema and TypeScript types from Payload CMS and copy the result into my Gatsby site. e.g. the GraphQL schema logic is a bit awkward:


    In other words, it's not a friendly plugin out of the box - but I'm working on it!

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!


Connect with the Payload Community on Discord



Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.