6 Client-side GraphQL with React and Apollo Client

This chapter covers

  • Connecting a React application to a GraphQL endpoint, using Apollo Client
  • Caching and updating data on the client, using Apollo Client
  • Updating data in the application, using GraphQL mutations
  • Using Apollo Client to manage React client state data

In the previous chapter, we created a React application, using Create React App, that allowed users to search for businesses by category. We used a single JavaScript object hardcoded into the application as the source of our data, so our application had limited functionality. In this chapter, we explore connecting our React application to the GraphQL API we created in previous chapters and introduce a new tool to our GraphQL toolbox: ...

Get Full Stack GraphQL Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.