Fetching All Products with GraphQL from the Hygraph API

To fetch our products from Hygraph, we must have our Content API. The Content API looks like this: https://api-us-east-1.graphcms.com/v2/API_KEY/master. API_KEY is the key that is unique for each API.

Now, let's fetch products from our API. In our Hygraph content repository, it is expected that we should have some e-commerce products already uploaded, which we want to fetch into our React application. We’ll do this with the free content API. Let's start by fetching all our products on the shop page.

Get hands-on with 1200+ tech skills courses.