How to extend query options #18966
Unanswered
SwapnilSoni1999
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hi @SwapnilSoni1999 👋 Have you taken a look at Prisma Client extensions? Client extensions should be able to solve your usecase. The Query component lets you hook into the query lifecycle and perform side effects, modify query arguments, or alter the results in a type-safe way. These are an alternative to middleware that provide full type safety. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prisma supports middleware functions, Here we can access
args
prop but I need some support to pass custom optionsfor eg.
so that I can use it in my middleware
here the problem is typescript types. If I pass
custom
in query it will throw an errorBeta Was this translation helpful? Give feedback.
All reactions