Cannot infer type of prisma accelerate extended client
I'm trying to use prisma accelerate so that I can use the caching functionality, but i'm running into an issue where typescript cannot actually infer the type of the resulting prisma client. This is the code i'm using to instantiate the client:
This is the error that I'm getting:
5 Replies
You decided to hold for human wisdom. We'll chime in soon! Meanwhile,
#ask-ai is there if you need a quick second opinion.for additional context, these are the current versions of prisma i'm using:
for now i've manually constructed an artificial type that injects the cacheStrategy parameter and other $accelerate functions appropriately. this is definitely not ideal...but seems to work for now. would love some insight here if there's a better solution:
You are on a super old version of prisma
Try 6.18.0? 🤔
unfortunately didn't help. still getting the same typing inference error
We had a new update go out version 6.19.0, can you try if that fixed it by any chance?
If not, would it be possible to provide a minimal reproduction so that our ORM team can have a look?