fix(queries/get-executions): recover flow and steps relations

This commit is contained in:
Ali BARIN
2023-10-25 12:05:53 +00:00
parent 651df1e2a1
commit b0d73aabc2

View File

@@ -45,16 +45,18 @@ const getExecutions = async (
.clone()
.joinRelated('executionSteps as execution_steps')
.select('executions.*', raw(selectStatusStatement))
.groupBy('executions.id')
.orderBy('updated_at', 'desc');
const computedExecutions = Execution
.query()
.with('executions', executions)
.withSoftDeleted()
.withGraphFetched({
flow: {
steps: true,
},
})
.groupBy('executions.id')
.orderBy('updated_at', 'desc');
const computedExecutions = Execution.query().with('executions', executions);
});
if (filters?.flowId) {
computedExecutions.where('executions.flow_id', filters.flowId);