Prisma

P

Prisma

The official Discord server of Prisma! Find us online at prisma.io

Join

Delete annoying warning in production

This warning pop-up in my log all the time : prisma:warn In production, we recommend using prisma generate --no-engine (See: prisma generate --help) I'm using the "normal" client and also the "edge" client, depending on my endpoint, so I can't use the --no-engine option. Is there a way to make this warning finally go away ? Thanks !...

Prisma.skip on deeply nested objects

Hello, is there a way to Prisma.skip deeply nested objects? In this case: ```...

Prisma JSON not working with "path"

Hi, I'm using Prisma with Postgres, I store some data with JSON inside, when using { where }, and providing the path and equals value, it does not work.

Cannot read properties of undefined (reading 'bind')

I am trying to update a project I haven't worked on in months. Went to update the prisma dependencies but when running the code, it is showing these errors. The version I updated it to is 6.2.1 which is the latest and am using mongodb. Tried to debug it but not sure what is causing it. ``` TypeError: Cannot read properties of undefined (reading 'bind') at _r.wrapEngine (/Users/Desktop/projects/playercount/node_modules/@prisma/client/runtime/library.js:111:11274)...

Significant Performance Gap: Prisma vs Supabase Client in Nuxt 3

Issue Description I've built a performance comparison tool to test the response times between Prisma and Supabase client when querying the same Supabase database. The results show that Prisma queries are significantly slower (approximately 7-8x) than direct Supabase client queries. Environment...
No description

Prisma.sql vs Prisma $queryRaw diff

Can someone guide me what is the main benefit of Prisma.sql and main differences with $queryRaw? I could not find the Prisma.sql in official docs. Is below approach corrct? ```ts export async function aggregateOpenPullRequestsInPeriod(...

Prisma Optimize Initialization Missing Database URL

After waiting 2 hours for migrations, I decided to give Optimize a go. I have my database url in my .env.development file, which works great when initializing my prisma clients in other files, the DB services. However, it can't find it on my index file. ``` // prettier-ignore import dotenv from 'dotenv'; dotenv.config();...

PrismaClientValidationError

Hello there, I'm currently stuck with this error: `` Invalid prisma.ticket.create()` invocation in ./src/lib/server/ticket.ts:12:16 9 phone_number: string,...

PrismaClientInitializationError

Hello! I'm new to posting here. I'm developing the Next.js app and deploying it to AWS Amplify. However, I'm having problems using Prisma and Auth.js. When I use both prima and auth's session, I get a "PrismaClientInitializationError." The local and Vercel hosting cases are working without this issue. Do you have any thoughts?
No description

Alternative to Apollo Server 4?

This is not really a Prisma question. But I gather many of you also use Prisma for your GraphQL needs, so I would like to know if someone could give me a tip on alternatives to using Apollo Server? It seems to have performance problems (or I am doing something wrong) so I would like to try if some other system might give better performance.

Error saving in database

I have this code but it save to the db ``Unique constraint failed on the constraint: UkladanieRole_username_key` at Vn.handleRequestError (C:\Users\wvn_0\Desktop\GalaxyBOT\bot\node_modules@prisma\client\runtime\library.js:121:7339) at Vn.handleAndLogRequestError (C:\Users\wvn_0\Desktop\GalaxyBOT\bot\node_modules@prisma\client\runtime\library.js:121:6663)...

Can't configure compiled Prisma query engine for FreeBSD

Could you help me to resolve the following issue? I compiled libquery_engine.so on FreeBSD v14, copied it to node_modules/@prisma/engines/libquery_engine.so.node, set variables in my .env file as PRISMA_QUERY_ENGINE_LIBRARY=/usr/local/www/node_modules/@prisma/engines/libquery_engine.so.node PRISMA_QUERY_ENGINE_BINARY=/usr/local/www/node_modules/@prisma/engines/libquery_engine.so.node...

Mocking Prisma with Bun

Hi, I'm trying to mock Prisma Client with Bun. I followed the Unit Testing guide which uses jest-mock-extended, but when I try to use it with bun I get the error seen in the screenshot. Unfortunately Google is zero help on this. Has anybody successfully mocked Prisma Client with Bun?
No description

TypeError: The "payload" argument must be of type object. Received null

Hi, I'm facing this issue [TypeError: The "payload" argument must be of type object. Received null] { code: 'ERR_INVALID_ARG_TYPE' } ...
No description

Tips for using Neon + Pulse + tRPC for real-time updates

I'm on the Pro plan, which guarantees "real-time" updates, Neon setup completed, Prisma client initialized using withPulse() and everything looks like it is setup correctly. However, new events from Pulse seem to arrive either very late or not arrive at all, regardless if I'm using stream() or subscribe(). Here's my tRPC router: ``` onChanges: protectedProcedure.subscription(async function* ({ ctx }) {...

Does Pulse .stream() have built-in reconnect logic?

On my server, it stopped receiving events for some reason. I had to restart the process and it came back online. Does Prisma have a recommended way for ensuring this connection stays active on long-running servers?

any RDS proxy support ?

i tried to implement prisma in my work but they using rds proxy, and its a blocker rn..

Using DELIMITER function in migration

Hi everyone, we have been trying to use the DELIMITER function within a prisma migration, but this fails, while the sql executed within mysql workbench was successfully executed. We also found the following threads: https://github.com/prisma/prisma/issues/12912 (still open issue, since 2022)...

Prisma + Supabase RLS

Conceptual question: is there a way to pass the user access token (JWT from supabase auth) when connecting from prisma ORM JS (or prisma-postgres) to Supabase to restrict the connection the user's authenticated role and enable RLS policies that use supabase's auth.uid() etc?

Getting P1012 preview feature not found using fullTextSearchPostgres

Using Prisma v6, when attempting to reset the my Postgres DB using prisma migrate reset --force, I am receving the following error: ``` Prisma schema loaded from prisma/schema Datasource "db": PostgreSQL database "db", schemas "audit, public" at "localhost:5432" ...