Fix cache miss

This commit is contained in:
Ramon Wenger 2020-11-17 16:23:43 +01:00
parent 5586f28250
commit 532f788cc9
1 changed files with 5 additions and 0 deletions

View File

@ -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});
}
}