Gatsby and GraphCMS are so easy

Posted at: Thursday, January 14, 2021

It is so easy with new gatsby-source-graphql. Just add some config, and you have the full power of your third-party GraphQL API.

This is magic!

Yes, it is. Here is how I did the config.

module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-graphql`,
      options: {
        fieldName: `cms`,
        url: `<YOUR GRAPHCMS URL>`,
        typeName: `GraphCMS`,
        refetchInterval: 10,
      },
    },
  ],
}

Remember to add public READ access to it.

This really is amazing, isn't it?