feat: add getExecution query

This commit is contained in:
Ali BARIN
2022-08-10 20:59:15 +02:00
parent 47ba42f9f8
commit 5d7daa8886
3 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import Context from '../../types/express/context';
type Params = {
executionId: string;
};
const getExecution = async (
_parent: unknown,
params: Params,
context: Context
) => {
const execution = await context.currentUser
.$relatedQuery('executions')
.withGraphFetched({
flow: {
steps: true
}
})
.findById(params.executionId);
return execution;
};
export default getExecution;