blitz-js / blitz

⚡️ The Missing Fullstack Toolkit for Next.js
https://Blitzjs.com
MIT License
13.51k stars 789 forks source link

support prisma extensions #4291

Open papsavas opened 5 months ago

papsavas commented 5 months ago

What do you want and why?

handle $extends() prisma function (currently errors to TypeError: (intermediate value).$extends is not a function

image image

(Correct) DB types using new PrismaClient() without blitz enhancement (cannot be used due to this):

image

Additional Context

The error of using

const db = new EnhancedPrisma().$extends(...)

image

siddhsuresh commented 5 months ago

hey @papsavas, thanks for the issue, can you please complete the issue template? Also can you provide an example of an extension failing for you with the typescript error.

Syarx commented 5 months ago

related to #4251

papsavas commented 5 months ago

@siddhsuresh i've added as much context as i could. A specified example is not necessary due to the global scope that the error holds, as also mentioned in #4251

siddhsuresh commented 5 months ago

thanks @papsavas, taking a look now

Syarx commented 4 months ago

any updates?