8 Replies
I haven’t given it a go and I’m gonna these days but so far this is what I found
https://github.com/trpc/trpc/tree/main/examples/next-edge-runtime
The tldr is that based on what I found you need to use the fetch adapter
GitHub
trpc/examples/next-edge-runtime at main · trpc/trpc
🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. - trpc/examples/next-edge-runtime at main · trpc/trpc
just tried it, its not working with prisma context
getting this error
Yeah I’ve seen some stuff with teh fetch adapter as well. I’ll give it a go too thanks!
Edge doesn’t work with Prisma I think. I switched to kysely
Yeah I’m gonna try it with drizzle
prisma cant run on the edge
https://www.prisma.io/blog/database-access-on-the-edge-8F0t1s1BqOJE
Found this, tho it still gives out the same error with prisma/client edge
Prisma
Database access on the Edge with Next.js, Vercel and Prisma Data Proxy
Learn how you can query databases in Edge environments using Prisma and the Prisma Data Proxy.
Prisma can't run on the edge, need to use something like Drizzle or Kysely. But I also don't think tRPC works either, so looking for solutions haha
This worked with Kysely! Successfully got my routes to the edge