Great guide man, thanks for writing it! It works great when you manually add the products through products.json, but I am currently trying to use this is on a website where I am getting the product data from Contentful / graphql. How would I go about adding the products from the graphql query to products.json or the checkout function? Thanks again and sorry if this is a stupid question but I'm fairly new to web development.
Tapas Adhikary, thanks for the fast reply! I'm loading the products directly from Gatsby graphql by using the gatsby-source-contentful plugin.
So if I understood correctly, I will have to use Apollo Client inside the checkout function to query Contentful and get the inventory?