GraphQL Query with Apollo Client in React
Let's implement and execute GraphQL queries!
We'll cover the following
In this lesson, we will implement our first GraphQL query using Apollo Client in React!
You’ve previously seen how different entities, such as the current user (viewer) or repositories, can be queried from GitHub’s GraphQL API. This time you will do it in React.
A Profile
component might be the best place to render the current user and its associated repositories. We’ll start by using the not-yet-implemented Profile
component in our App
component in the src/App/index.js file, which we’ll take care of next. It makes sense to extract the Profile
component now because the App
component will be the static frame around the application later.
Components like Navigation
and Footer
are static, and components such as Profile
and Organization
(which you’ll see later) are dynamically rendered based on routing (URLs).
Get hands-on with 1400+ tech skills courses.