There should be a way to tell the source plugin to only source nodes for a particular locale? This would allow having one Dato instance, but being able to break up in to multiple Gatsby sites where all that is changed is an environment variable
Currently, I believe it sources everything. There are ways to break it into multiple sites that limit the number of pages created, queried, etc. in gatsby-node, but the sourcing is still over-eager.
The option could look something like:
// In your gatsby-config.js
plugins: [
{
resolve: `gatsby-source-datocms`,
options: {
apiToken: `YOUR_READONLY_API_TOKEN`,
environment: `main`,
// New option vvv
locale: process.env.DATO_LOCALE
},
},
];
It looks like there is a locale
filter option in the datocms-client
here which I think could be passed in here.