tRPC on the Edge?

Anyone have success with this?
8 Replies
Yiannis
Yiannis2y ago
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
Royal Lobster
Royal Lobster2y ago
just tried it, its not working with prisma context
Royal Lobster
Royal Lobster2y ago
getting this error
anthonylin198
anthonylin198OP2y ago
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
Yiannis
Yiannis2y ago
Yeah I’m gonna try it with drizzle
Neto
Neto2y ago
prisma cant run on the edge
Royal Lobster
Royal Lobster2y ago
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.
anthonylin198
anthonylin198OP2y ago
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
Want results from more Discord servers?
Add your server