Open andrewpeters9 opened 6 months ago
For an idea of how this would work at a high level, have a look at keystone-js, which is also built on top of Prisma.
They're docs explain the implementation pretty well: https://keystonejs.com/docs/guides/hooks and the hooks api: https://keystonejs.com/docs/config/hooks
Is your feature request related to a problem? Please describe.
.$extends
requires explicit method wrapping, and doesn't support method-level extending.Example Usecases:
Like
document would fire a hook that updates theirPost
document.User
model with amembership
level, you may want to send the user an email thanking them for purchasing xyz subscriptionDescribe the solution you'd like
enhance
call, i.e. allowing the user to execute JS based onPotential Challenges:
Comment from @ymc9