added a new mutate replacement for useEntityMutate to quickly update cache without revalidating

This commit is contained in:
dswbx
2024-12-21 15:03:14 +01:00
parent deddf00c38
commit 3a79ce2cf8
3 changed files with 91 additions and 30 deletions

View File

@@ -270,7 +270,7 @@ export class Mutator<
return (await this.many(qb)) as any;
}
async updateWhere(data: Input, where?: RepoQuery["where"]): Promise<MutatorResponse<Output[]>> {
async updateWhere(data: Partial<Input>, where?: RepoQuery["where"]): Promise<MutatorResponse<Output[]>> {
const entity = this.entity;
const validatedData = await this.getValidatedData(data, "update");