Skip to content

Fixed work item subscriptions to prevent invalidating cache

Natalia Tepluhina requested to merge ntepluhina-fix-refetching-WI into master

What does this MR do and why?

Currently, when updating assignees, due date, or status on the work item, we have a query that refetches the work item right after a successful mutation response. This is caused by subscriptions that have a different shape from work item query which leads to cache invalidation.

This MR updates the shape of the subscription response to match the query and prevent refetching.

Screenshots or screen recordings

Before After
before after

How to set up and validate locally

  1. Enable the work items feature flags
    Feature.enable(:work_items)
    Feature.enable(:work_items_mvc_2)
  2. Visit any work items such as http://127.0.0.1:3000/groups/flightjs/-/work_items/2
  3. Update the assignees, due date, or status.
  4. Check the Network tab: there should be no workItem query calls after workItemUpdate

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Natalia Tepluhina

Merge request reports