feat: Implement initial version of getExecutions query

This commit is contained in:
Faruk AYDIN
2022-03-09 20:45:03 +03:00
committed by Ömer Faruk Aydın
parent d4bef44b93
commit 343b360303
5 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import Context from '../../types/express/context';
const getExecutions = async (
_parent: unknown,
_params: unknown,
context: Context
) => {
const executions = await context.currentUser
.$relatedQuery('executions')
.withGraphFetched('flow')
.orderBy('created_at', 'asc');
return executions;
};
export default getExecutions;