Fix refetching on task links after adding a new task
What does this MR do and why?
Currently, as described in !103564 (comment 1169371185), there is a work item refetch after we add an existing task to the work item. This happens because the mutation response contains just a partial result comparing to the query, so the cache gets invalidated => Apollo performs a refetch. This MR aligns query and mutation responses and prevents cache invalidation.
Screenshots or screen recordings
No visual changes
How to set up and validate locally
- Open an issue page and open
Network
tab in browser devtools. - Add a new Task to the tasks widget, when adding, select
Adding an existing task
. - Make sure that after
workItemUpdate
mutation there is noworkItem
query call
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Natalia Tepluhina