Fouad Raheb
How to have 2 separate trpc clients for http and websockets?
Seems like the only way to not have an empty websocket connection created is by creating
wsLink
on run time, but this would create multiple connections for each useSubscription
. We just need to have a way to not start a connection if no messages are sent yet and no active useSubscription
14 replies
How to have 2 separate trpc clients for http and websockets?
I'm trying to have this example use 2 separate trpc clients, so that only some queries/mutations/subscriptions use the websocket client and the rest with the default http client
https://github.com/trpc/examples-next-prisma-websockets-starter
14 replies