From 532f788cc9532faa712114dd409727f062b2df48 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Tue, 17 Nov 2020 16:23:43 +0100 Subject: [PATCH] Fix cache miss --- client/src/pages/studentSubmission.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/pages/studentSubmission.vue b/client/src/pages/studentSubmission.vue index caa8747f..b24c8d89 100644 --- a/client/src/pages/studentSubmission.vue +++ b/client/src/pages/studentSubmission.vue @@ -219,6 +219,11 @@ final: updatedSubmissionFeedback.final }); + if (updatedSubmissionFeedback.text) { + // text is only being set on create and on turing in, then we'll update the cache with it. Otherwise, we'll trust the local state, as to not overwrite the input field + data.studentSubmission.submissionFeedback.text = updatedSubmissionFeedback.text; + } + store.writeQuery({query, variables, data}); } }