WebSocket Subscriptions in Next.js 14 Using `fetchRequestHandler` and `createTRPCReact`
Hello everyone,
Does anyone have a working example of using WebSockets/subscriptions with
fetchRequestHandler
on Next.js 14? I haven't been able to get subscriptions working with my current approach using fetchRequestHandler
and createTRPCReact
.
Any help would be greatly appreciated!
Thank you!2 Replies
Solution
You can use the httpSubscriptionLink, but it won't work well on serverless
hey, i just switched to
httpSubscriptionLink
, and it worked perfectly. thanks for the help, keep up the great work!