The Apollo deletePost mutation

A basic drop-down menu, with one item, is there. We should add a second menu item to complete the drop-down menu.

This task is something that you can do as homework, in your own time. All of the techniques to get a delete mutation running have been explained.

For historical reasons, I want to cover the full CRUD workflow. After this chapter, you will be able to handle pretty advanced CRUD operations with Apollo, GraphQL, and React.

Just follow my instructions to get the delete action working:

  1. Edit the GraphQL schema. The deletePost mutation needs to go inside of the RootMutation object. The new Response type serves as a return value, as deleted posts cannot be returned because they do not exist. Note that we ...

Get Hands-On Full-Stack Web Development with GraphQL and React now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.