# ApolloMutation You can use the `ApolloMutation` (or `apollo-mutation`) component to call Apollo mutations directly in your template. Here is an example: ```vue ``` See [ApolloQuery](./query.md) to learn how to write GraphQL queries in the template. See [API Reference](../../api/apollo-mutation.md) for all the available options. ## Updating the cache If the mutation is only updating objects you already have in the cache (for example, editing existing fields), you don't need to do anything as Apollo Client will update the cache automatically. This works only if the object in the mutation result contains the `__typename` and `id` fields (or the custom fields you use to [normalize the cache](https://www.apollographql.com/docs/react/advanced/caching#normalization)). Otherwise, you need to tell Apollo Client how to update the cache with the mutation result. For example, if the mutation adds a new item, you have to update the relevent query result to effectively push this new items to the query. ### Adding an item ```vue ``` ### Removing an item ```vue ```