NicoFish
Explore posts from serversPPrisma
•Created by NicoFish on 10/9/2024 in #help-and-questions
Extending client not typesafe
I'm working in a NestJS project and need to extend the prisma client to replace all
Date
with string
.
I have this code:
But when using the client, it does not apply the extension types.7 replies
Change db url in ctx with an API call
I want to have a switch in my frontend to change from dev db to prod db. I'm using prisma. Have 2 prisma instances (one for prod and the other for dev). Is there any way to override the prisma instance in the ctx with an API call?
4 replies
Trouble with Vercel and deployment URL
Hey I've been having a problem with nextjs deploying to vercel. In localhost the calls to the backend are done correctly, but when deployed, the calls are made to
https://myvercelurl.vercel.app/deployment_url/api/trpc/....
I don't know why the hell the deployment_url is inserted there.
Running in npm, packages:
@trpc/client: ^10.45.0 => 10.45.1
@trpc/next: ^10.45.0 => 10.45.1
@trpc/react-query: ^10.45.0 => 10.45.1
@trpc/server: ^10.45.0 => 10.45.1
next: 14.1.0 => 14.1.0
react: ^18 => 18.2.0
typescript: ^5 => 5.3.3
If someone could help me I will really appreciate it1 replies