Hey all, Just have a quick question, does Prisma ...
# orm-help
a
Hey all, Just have a quick question, does Prisma have lifecycle hooks? Can't find anything by looking for them, there's a few references to it from the past but nothing I found was concrete (or open for that matter).
r
Hi @Austin Paquette - I think it's now called
middleware
https://www.prisma.io/docs/concepts/components/prisma-client/middleware
Middleware allows you to perform an action before or after each query runs. Use the
prisma.$use
method to add middleware:
Is that what you are looking for?
a
Based on what I see, I think that's exactly what I need. I definitely didn't think to look for the middleware keyword. I'm fairly confident I can solve my problem with this. Thank you very much!
r
No problem, glad to have helped 🙂