From d1932a107bb6ee20d1c6eb74194d55a955530fe0 Mon Sep 17 00:00:00 2001 From: Faruk AYDIN Date: Sun, 16 Oct 2022 15:00:08 +0200 Subject: [PATCH] feat: Query soft-deleted executions and execution steps --- packages/backend/src/graphql/queries/get-execution-steps.ts | 2 ++ packages/backend/src/graphql/queries/get-executions.ts | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/graphql/queries/get-execution-steps.ts b/packages/backend/src/graphql/queries/get-execution-steps.ts index 33fdd3f5..8267dbd7 100644 --- a/packages/backend/src/graphql/queries/get-execution-steps.ts +++ b/packages/backend/src/graphql/queries/get-execution-steps.ts @@ -14,11 +14,13 @@ const getExecutionSteps = async ( ) => { const execution = await context.currentUser .$relatedQuery('executions') + .withSoftDeleted() .findById(params.executionId) .throwIfNotFound(); const executionSteps = execution .$relatedQuery('executionSteps') + .withSoftDeleted() .withGraphFetched('step') .orderBy('created_at', 'asc'); diff --git a/packages/backend/src/graphql/queries/get-executions.ts b/packages/backend/src/graphql/queries/get-executions.ts index 068fb36b..9497543b 100644 --- a/packages/backend/src/graphql/queries/get-executions.ts +++ b/packages/backend/src/graphql/queries/get-executions.ts @@ -13,10 +13,11 @@ const getExecutions = async ( ) => { const executions = context.currentUser .$relatedQuery('executions') + .withSoftDeleted() .withGraphFetched({ flow: { - steps: true - } + steps: true, + }, }) .orderBy('created_at', 'desc');