Commit 883a98d9 authored by David O'Regan's avatar David O'Regan

Merge branch '335027-cache-update-with-immer-fix' into 'master'

Fix cache update for schedules and policies

See merge request gitlab-org/gitlab!65491
parents f1702175 16e8c261
......@@ -22,7 +22,10 @@ const addEscalationPolicyToStore = (store, query, { escalationPolicyCreate }, va
});
const data = produce(sourceData, (draftData) => {
draftData.project.incidentManagementEscalationPolicies.nodes.push(policy);
draftData.project.incidentManagementEscalationPolicies.nodes = [
...draftData.project.incidentManagementEscalationPolicies.nodes,
policy,
];
});
store.writeQuery({
......
......@@ -22,10 +22,13 @@ const addScheduleToStore = (store, query, { oncallScheduleCreate }, variables) =
});
const data = produce(sourceData, (draftData) => {
draftData.project.incidentManagementOncallSchedules.nodes.push({
...schedule,
rotations: { nodes: [], __typename: ROTATION_CONNECTION_TYPE },
});
draftData.project.incidentManagementOncallSchedules.nodes = [
...draftData.project.incidentManagementOncallSchedules.nodes,
{
...schedule,
rotations: { nodes: [], __typename: ROTATION_CONNECTION_TYPE },
},
];
});
store.writeQuery({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment