In the previous lesson we learned how to change the data on the GraphQL server with mutations, and how they are able to automatically update the Apollo cache. Unfortunately, automatic update is not always the case. This works when we have an existing entity (in our case, it’s a Book
and we update some properties of it), but what happens if we want to create a new entity and add it to the list? How do we handle Apollo cache changes and UI updates? We will answer all these questions in this lesson.
Before we start adding any new code to our Vue application, let’s first shape a mutation to add a new book