Tapas Adhikary
Educator @tapaScript | Founder CreoWis & ReactPlay - Writer - YouTuber - Open Source
Jamstack is a modern web development architecture based on client-side JavaScript, reusable APIs, and prebuilt Markup. One of the aspects of Jamstack is, it is practically serverless. To put it more clearly, we do not maintain any server-side applica...
blog.greenroots.info13 min read
James Peters, Thanks for reading the article and asking. Are you using the Netlify Function to load the product or directly from gatsby? If it is from gatsby directly, we can use something like Apollo Client for React to fetch it. This will also help you in syncing the UI when data changed in the backend.
If you are connecting to a DB through netlify functions, there also we can query using GraphQL. I have a few examples here,
blog.greenroots.info/how-to-build-a-serverless-ap…
Hope I understood your question and my response helps you!
James Peters
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.