Woman wearing Vision Pro
PPrisma
•Created by Woman wearing Vision Pro on 5/17/2025 in #help-and-questions
Prisma + Serverless + Supabase
I'm trying to get Prisma up and running again on Vercel as I'm moving off Prisma Accelerate
I'm using Supabase (Postgres) as my database provider. However, I keep getting a lot of errors due to:
1. Not using prisma from
@prisma/client/edge
2. Not using Prisma Accelerate so my connection url doesn't start with prisma://
I can't use a driver adapter as node-postgres
(pg
) isn't supported. I have added ?pgbouncer=true
to my connection string (suggested by Supabase as well), however, Prisma still doesn't want to work
What are my options right now?
I'm also using prisma-client-js
right now, I'm willing to switch to the preview prisma-client
if that helps?4 replies
PPrisma
•Created by Woman wearing Vision Pro on 5/25/2024 in #help-and-questions
Prisma with Accelerate TypeScript error
When I'm using Prisma with Accelerate, the Prisma types are not generated for the Accelerate extension. Trying to use
cacheStrategy
results in TS showing the following error:
I'm using SvelteKit and have the following setup:
src/app.d.ts
:
src/lib/server/prisma.ts
:
How can I fix this?8 replies
PPrisma
•Created by Woman wearing Vision Pro on 4/4/2024 in #help-and-questions
Optimizing a query
I currently have the following code to update the pricing of the items in the database:
This is a cron job that runs every day and I have 700 items. So every day, 700 queries are being executed.
This is not great, especially since I'm using Accelerate as this costs 21000 queries a month (700 * 30).
I don't know how to optimize this, since updateMany doesn't work with multiple different id's.
Any help would be great!
5 replies