Question about integrating some business logic lik...
# prisma-client
s
Question about integrating some business logic like sending an email, taking a screenshot with puppeteer, accepting a stripe payment etc... Would the right tool to implement that in reaction to a data write be the
middleware
? https://www.prisma.io/docs/concepts/components/prisma-client/middleware Sounds like the perfect thing to integrate 3rd party APIs before/after a DB operation.
n
Hey Simon 👋 yes indeed, middleware allows you to hook into the query cycle and add some custom code that should be called upon certain Prisma Client queries! So the things you’ve mentioned sound like great use cases for middleware 🙌
s
Thank you so much - sorry I totally missed your reply until now 😅