Commit 16e8c261 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska Committed by David O'Regan

Fix cache update for schedules and policies

Changelog: fixed
EE: true
parent 99f5cbd3
......@@ -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