I'm building a headless Shopify shop using Gatsby and likely hosting it on Netlify. One big mystery to me is in regards to best practices when it comes to updating static pages.
I know I'd want to trigger a rebuild when...
- New images are added to the shop
- New content is added to the 3rd party CMS
- When product information is modified in the Shopify Admin
- When metafield values are changed
- Probably a more events that I'm not aware of yet...
Here's an example: I have a badge on a product card in the collection page that says "unavailable", and this badge is based on the GraphQL (`availableForSale`) query which is currently run at build time on the server, not per page load. However, rebuilding the site when a product qty reaches zero doesn't seem very efficient.