From 94e434f44b7fb0e33de823b24ca92f0d4f2efa94 Mon Sep 17 00:00:00 2001 From: Ramon Wenger <1902241+ramonwenger@users.noreply.github.com> Date: Thu, 13 Sep 2018 19:11:27 +0200 Subject: [PATCH] docs: Fix an error in the mutations documentation (#390) --- docs/guide/apollo/mutations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/apollo/mutations.md b/docs/guide/apollo/mutations.md index 9009b37..cd8b500 100644 --- a/docs/guide/apollo/mutations.md +++ b/docs/guide/apollo/mutations.md @@ -33,11 +33,11 @@ methods: { // Update the cache with the result // The query will be updated with the optimistic response // and then with the real result of the mutation - update: (store, { data: { newTag } }) => { + update: (store, { data: { addTag } }) => { // Read the data from our cache for this query. const data = store.readQuery({ query: TAGS_QUERY }) // Add our tag from the mutation to the end - data.tags.push(newTag) + data.tags.push(addTag) // Write our data back to the cache. store.writeQuery({ query: TAGS_QUERY, data }) },