From 6699addbd45d17c9a571004c1c07bf54f908ed02 Mon Sep 17 00:00:00 2001 From: BernieHo <25528838+BernieHo@users.noreply.github.com> Date: Thu, 20 Jan 2022 11:59:25 +0100 Subject: [PATCH] fix: make refetch of GET_NOTES work Updating the cache with query of GET_NOTES didn't work. Deleted messages still showed up on home "/" . Fixed --- final/components/DeleteNote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/final/components/DeleteNote.js b/final/components/DeleteNote.js index fc16d97..7f119fe 100644 --- a/final/components/DeleteNote.js +++ b/final/components/DeleteNote.js @@ -12,7 +12,7 @@ const DeleteNote = props => { id: props.noteId }, // refetch the note list queries to update the cache - refetchQueries: [{ query: GET_MY_NOTES, GET_NOTES }], + refetchQueries: [{ query: GET_MY_NOTES }, { query: GET_NOTES }], onCompleted: data => { // redirect the user to the "my notes" page props.history.push('/mynotes');