Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Payload + Gatsby

default discord avatar
t0mlast year
4

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
    generator101last year
  • default discord avatar
    t0mlast year

    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
    capitalt2160last year

    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!

  • default discord avatar
    emmanu31last year

    @t0m have you given a try to the gatsby plugin? I am wondering if it supports incremental builds, I couldn't find anything in the docs about it

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.