When checking out the typings for the update method in Prisma ORM, I found that I can only include a where clause for unique fields:
return this.prisma.publication.update({
data,
where: {id},
});
I'd love to combine this with authentication and do something like:
return this.prisma.publication.update({
data,
where: {id, owner: user.id}, <-- Authorisation
});
Is this at all possible with Prisma or do I need a separate query for this that retrieves the instance?