Fix issues with Apollo cache in workflow module (#7569)

Fixes #7523
This commit is contained in:
Baptiste Devessier
2024-10-11 15:26:25 +02:00
committed by GitHub
parent 3761fbf86f
commit 521dd04d56
7 changed files with 77 additions and 66 deletions

View File

@ -50,7 +50,6 @@ export const RecordShowPageWorkflowHeader = ({
);
return deleteOneWorkflowVersion({
workflowId: workflowWithCurrentVersion.id,
workflowVersionId: workflowWithCurrentVersion.currentVersion.id,
});
}}
@ -69,9 +68,10 @@ export const RecordShowPageWorkflowHeader = ({
workflowWithCurrentVersion,
);
return activateWorkflowVersion(
workflowWithCurrentVersion.currentVersion.id,
);
return activateWorkflowVersion({
workflowVersionId: workflowWithCurrentVersion.currentVersion.id,
workflowId: workflowWithCurrentVersion.id,
});
}}
/>
) : workflowWithCurrentVersion?.currentVersion?.status === 'ACTIVE' ? (

View File

@ -108,7 +108,10 @@ export const RecordShowPageWorkflowVersionHeader = ({
Icon={IconPower}
disabled={isWaitingForWorkflowVersion}
onClick={() => {
return activateWorkflowVersion(workflowVersion.id);
return activateWorkflowVersion({
workflowVersionId: workflowVersion.id,
workflowId: workflowVersion.workflowId,
});
}}
/>
) : workflowVersion?.status === 'ACTIVE' ? (