feat(authorization): add read flow checks

This commit is contained in:
Ali BARIN
2023-06-23 20:34:19 +00:00
parent 69582ff83d
commit 0d092b977f

View File

@@ -5,6 +5,8 @@ type Params = {
};
const getFlow = async (_parent: unknown, params: Params, context: Context) => {
context.currentUser.can('read', 'Flow');
const flow = await context.currentUser
.$relatedQuery('flows')
.withGraphJoined('[steps.[connection]]')