fix: refetch step executions upon deleting and testing steps

This commit is contained in:
Ali BARIN
2023-05-13 13:47:54 +00:00
parent 3572e6f65a
commit 43b0d9ed29
2 changed files with 5 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ function FlowStepContextMenu(
): React.ReactElement {
const { stepId, onClose, anchorEl, deletable } = props;
const [deleteStep] = useMutation(DELETE_STEP, {
refetchQueries: ['GetFlow'],
refetchQueries: ['GetFlow', 'GetStepWithTestExecutions'],
});
const formatMessage = useFormatMessage();

View File

@@ -58,7 +58,10 @@ function TestSubstep(props: TestSubstepProps): React.ReactElement {
const editorContext = React.useContext(EditorContext);
const [executeFlow, { data, error, loading, called, reset }] = useMutation(
EXECUTE_FLOW,
{ context: { autoSnackbar: false } }
{
refetchQueries: ['GetStepWithTestExecutions'],
context: { autoSnackbar: false }
}
);
const response = data?.executeFlow?.data;