refactor: Use input params for all mutations

This commit is contained in:
Faruk AYDIN
2022-03-08 01:13:16 +03:00
committed by Ömer Faruk Aydın
parent 212523aec6
commit bb36748764
14 changed files with 149 additions and 60 deletions

View File

@@ -1,7 +1,9 @@
import Context from '../../types/express/context';
type Params = {
id: string;
input: {
id: string;
};
};
const deleteStep = async (
@@ -13,7 +15,7 @@ const deleteStep = async (
.$relatedQuery('steps')
.withGraphFetched('flow')
.findOne({
'steps.id': params.id,
'steps.id': params.input.id,
})
.throwIfNotFound();