...
/Challenge: Fetching Content from Hygraph with GraphQL
Challenge: Fetching Content from Hygraph with GraphQL
Practice fetching content from Hygraph with GraphQL.
In this challenge, you are required to perform two tasks.
Task 1: Fetch all categories from the Hygraph API
On our home page, we have a categories section. This category section is added via a component.
We added these images manually, but we want to get these images from our Hygraph content repository using the following GraphQL query:
Press + to interact
{categories {idimage {url}}}
Fetch and add all categories from the embedded content API to our React application. We’ll do this in the Categories
component. Ensure you remove all dummy data so we can get all this ...