Improve API + set functions in state (#17560)

Prefetch functions and set these in state

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Thomas Trompette
2026-01-30 10:24:07 +01:00
committed by GitHub
parent 69c53c7dff
commit f7adf1698e
19 changed files with 111 additions and 98 deletions
@@ -36,8 +36,7 @@ export const useCreateStep = () => {
connectionOptions,
shouldSelectNode = true,
workflowVersionId: providedWorkflowVersionId,
logicFunctionId,
name,
defaultSettings,
}: {
newStepType: WorkflowActionType;
parentStepId: string | undefined;
@@ -46,8 +45,7 @@ export const useCreateStep = () => {
connectionOptions?: WorkflowStepConnectionOptions;
shouldSelectNode?: boolean;
workflowVersionId?: string;
logicFunctionId?: string;
name?: string;
defaultSettings?: Record<string, unknown>;
}) => {
if (isLoading === true) {
return;
@@ -69,8 +67,7 @@ export const useCreateStep = () => {
nextStepId,
position,
parentStepConnectionOptions: connectionOptions,
logicFunctionId,
name,
defaultSettings,
})
)?.data?.createWorkflowVersionStep;