Swap a theme's data source?July 14, 2019 at 5:21am
I started experimenting with gatsby themes, and I wonder if there is a "standard" way of swapping out a data source. For example use the
gatsby-starter-blog-theme, but feed posts from somewhere else. Any pointers on how to start?
July 15, 2019 at 3:23am
The basic idea is that a theme could define what data it needs and then a data source could fulfill the data request. Lots to figure out around exactly this would work.
July 15, 2019 at 1:06pm
Thank you for the answer! I see. I'm trying to get a proof of concept. Assuming there is an external graphql api with compatible typing that is plugged in with
gatsby-source-graphql: Would it be possible to use schema customization to override certain fields and send them to the external source instead? Or create a custom source that overrides these fields? Or alter configuration to inject a new source (under the assumption of type compatibility)?