PinkiePie
different transformers for different routers
How can I specify a transformer per router? On the client, I use superjson with BatchLink for everything, except file uploads (no superjson, HttpLink). It works fine, but on the backend all routers use superjson, so the returned object has a wrapper with a single
json
field in it, and TS types are mismatching (TS types assume no wrappers will be there)2 replies
trpc doesn't work after migrating to next 15
When i upgraded to Next 15 (pages router), all trpc routes fails with status 500 on production. The result message is
{"error":{"json":{"message":"req.socket.once is not a function","code":-32603,"data":{"code":"INTERNAL_SERVER_ERROR","httpStatus":500}}}}
. I don't really understand if it's TRPC issue, Next issue or even Netlify issue (i host my website there, but they declare to support Next 15). Does anybody have an idea where the problem could be? I don't call req.socket.once
anywhere in my code, so the issue is probably with one of those places15 replies
Websocket connects even without any subscriptions
Currently, when I add a WS link, it tries to connect to the server right away. How can I prevent this behavior and allow it to connect only if there are any active subscriptions? Unlogged users don't have subscriptions, so they should not connect to WS server
6 replies