update user mutation

This commit is contained in:
2024-10-11 17:55:29 +07:00
parent 01b8400a7a
commit 2893b43d30
6 changed files with 88 additions and 36 deletions

View File

@@ -75,6 +75,14 @@ export class PrismaCrudGenerator<Types extends SchemaTypes> {
}));
}
findUniqueArgs<Name extends string & keyof Types['PrismaTypes']>(
modelName: Name,
) {
return this.builder.args((t) => ({
where: t.field({ type: this.getWhereUnique(modelName), required: true }),
}));
}
getWhere<Name extends string & keyof Types['PrismaTypes']>(
modelName: Name,
without?: string[],