Prisma

P

Prisma

Join the community to ask questions about Prisma and get answers from other members.

Join

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" ...

"payload" argument must be of type object. Received null

hey guys im using nextjs and im facing the: "payload" argument must be of type object. Received null error what is the reason im getting this error i cant find anything ```ts await prisma.patient.create({ data: {...

Fluent API doesn't work as expected with client extensions

Hello, I am building a GraphQL API using NestJs and Prisma ORM. The Prisma client extension is used to manage the RLS policies as follows: ```ts client.$extends({ query: {...

Prisma Promises not transferring context like Promises?

A typical pattern in software is asyncLocalStorage.run(new Map(), () => { const store = asyncLocalStorage.getStore(); //Generate our own txId for every request...

Pulse on ECS

Hi gang, we've recently adopted Pulse, and noticed only upon deploying to production that our ECS containers cannot either .stream() or .subscribe to any of our models. Hunch is that Pulse is driven by a websocket under the hood, and that the ELB is to blame here. Do you have any recommended configurations for this deployment environment?

When using createManyAndReturn, am I guaranteed the results order to be the same as of the input?

When using createManyAndReturn, am I guaranteed the results order to be the same as of the input?

The "omit" field type is not generated for Prisma client - v6.2.0

While attempting to play with the new omit exclusion feature (here: https://www.prisma.io/docs/orm/prisma-client/queries/excluding-fields#excluding-a-field-globally-using-omit), I found what may be a generator bug. I'm seeing the typescript error of, Object literal may only specify known properties, and 'omit' does not exist in type 'Subset<PrismaClientOptions, PrismaClientOptions>' when attempting to use new PrismaClient({ omit: { user: password } }). ...

Issues connecting prisma db to next.js

getting an sever error Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again. posted more information on github page...

PrismaModule as globle in neatjs with prisma service and dburl

How to #parametrize db url if i want to always pass this url from my request. I want like db per tanant model......