feat: Implement initial version of getExecutions query
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
d4bef44b93
commit
343b360303
16
packages/backend/src/graphql/queries/get-executions.ts
Normal file
16
packages/backend/src/graphql/queries/get-executions.ts
Normal 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;
|
Reference in New Issue
Block a user