Prisma.join throwing error when using edge client
prisma : 5.22.0
@prisma/client : 5.22.0
Node.js : v23.1.0
Next.JS : v15.0.3
Temporary solution (bad):
change
import { PrismaClient } from "@prisma/client/edge";
to
import { PrismaClient } from "@prisma/client";
When i tried to use Prisma.join() on raw query using edge client i got an error: TypeError: The "payload" argument must be of type object. Received null
Example query:
Any idea how to make it work on edge?
Solution:Jump to solution
Hi @Papa Smerf
The edge client is a stripped down version and may not support the Prisma.join() api. Rewriting the raw query without using Prisma.join() should resolve this issue.
``
await prisma.$queryRaw
...3 Replies
Solution
Hi @Papa Smerf
The edge client is a stripped down version and may not support the Prisma.join() api. Rewriting the raw query without using Prisma.join() should resolve this issue.
The raw query example assumes you are using Postgres. Let me know if this helps.
Yep it works. Thank you!
I'm glad to hear it works 🎉