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