Let's get you some practice with adding a mutation feature.

Here's what you'll need to do:

  1. Use GraphQL Playground to construct the deleteHabit mutation with the correct variables.
  2. Add the mutation and the useMutation hook to Habit.js.
  3. Add a button next to each habit item to call the mutation.
  4. Don't forget about the error and loading states!

I'll show you what I came up with in the next video.

 

I finished! On to the next chapter