I’m trying to combine my Dato Product content with my Shopify Product pricing into one product query in Gatsby. Wondering if anyone had any suggestions on how to get this working?
Options I’ve explored and their results:
-
Using the
Shopify product id
plug-in. This works fine for programmatically created pages like single product pages. We currently query data from Dato (gatsby-node.js) and pass the Shopify id’s through the page context to the template, then query Shopify pricing in the template. Non-programmatically created pages like a product list page are a bit dicier due to the inability to run a second query after the first-page query and not being able to pass variables to the static query component. -
Using the
Shopify product JSON
plug-in. This would solve my problem but, the JSON data becomes stale if you don’t manually delete and re-add the Shopify connection every time you change data in Shopify. Also, I can’t find the repo this plug-in comes from, so I can’t even look at the code to potentially fix this issue. -
Digging into Gatsby’s Schema customization API I’m currently doing this but, it seems it may be easier to switch to Prismic to get this functionality out of the box instead of writing a custom solution.
Sorry if I sound frustrated, I’ve wasted 2 days messing with this and I’m running out of time.