Middleware (Reference) | Prisma Documentation

Prisma Client middleware allows you to perform actions before or after any query on any model with the prisma.$use method.