GraphQL Mutation with Apollo Client in React
We will cover GraphQL Mutations regarding some repository operations using Apollo Client in React in this lesson.
We'll cover the following
The previous lessons have taught you how to query data with React Apollo and the Apollo Client. In this lesson, you will learn about mutations. As in other applications before, we have implemented starring a repository with GitHub’s exposed addStar
mutation.
The mutation starts out with a variable to identify the repository to be starred. We haven’t used a variable in Query
component yet, but the following mutation works the same way, which can be defined in the src/Repository/RepositoryItem/index.js file.
Get hands-on with 1400+ tech skills courses.