Payload + Gatsby

default discord avatar
t0m
2 months ago
3

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 (

https://www.gatsbyjs.com/

). 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).



Thanks!

  • default discord avatar
    generator101
    2 months ago
  • default discord avatar
    t0m
    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
    capitalt2160
    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:

    https://github.com/thompsonsj/gatbsy-source-payload-cms/issues/12

    .



    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!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

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