diff --git a/packages/web/src/components/Editor/index.tsx b/packages/web/src/components/Editor/index.tsx index 9b10094a..aa0afd55 100644 --- a/packages/web/src/components/Editor/index.tsx +++ b/packages/web/src/components/Editor/index.tsx @@ -40,7 +40,11 @@ function updateHandlerFactory(flowId: string, previousStepId: string) { export default function Editor(props: EditorProps): React.ReactElement { const [updateStep] = useMutation(UPDATE_STEP); - const [createStep, { loading: creationInProgress }] = useMutation(CREATE_STEP); + const [createStep, { loading: creationInProgress }] = useMutation(CREATE_STEP, { + refetchQueries: [ + 'GetFlow' + ] + }); const { flow } = props; const [triggerStep] = flow.steps; diff --git a/packages/web/src/components/FlowStepContextMenu/index.tsx b/packages/web/src/components/FlowStepContextMenu/index.tsx index 8b8a05e1..3016e348 100644 --- a/packages/web/src/components/FlowStepContextMenu/index.tsx +++ b/packages/web/src/components/FlowStepContextMenu/index.tsx @@ -16,7 +16,11 @@ type FlowStepContextMenuProps = { function FlowStepContextMenu(props: FlowStepContextMenuProps): React.ReactElement { const { stepId, onClose, anchorEl, deletable } = props; - const [deleteStep] = useMutation(DELETE_STEP); + const [deleteStep] = useMutation(DELETE_STEP, { + refetchQueries: [ + 'GetFlow' + ] + }); const formatMessage = useFormatMessage(); const deleteActionHandler = React.useCallback(async (event: React.SyntheticEvent) => {