tRPCttRPC
Powered by
OdielO
tRPC•15mo ago•
9 replies
Odiel

What is wrong with my subscription setup?

Hi, I'm new to trpc and while playing with subscriptions for some reason I can't make it work.
In this gist (https://gist.github.com/odiel/f4d3d09650fd1598ea29f6750e76841a) I have the server and client setup. I'm using the latest Deno version and "@trpc/server": "npm:@trpc/server@^11.0.0-rc.638", "@trpc/client": "npm:@trpc/client@^11.0.0-rc.638",. Once running the client it stays in, and I don't get to see any of the events emitted on the backend reaching the client. What am I doing wrong?
 << subscription  #1 example  {
  input: undefined,
  result: { result: { type: "state", state: "pending", error: null } },
  elapsedMs: 139243
}
 << subscription  #1 example  {
  input: undefined,
  result: { result: { type: "state", state: "pending", error: null } },
  elapsedMs: 139243
}
Gist
client.txt
GitHub Gist: instantly share code, notes, and snippets.
client.txt
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Anyone has successfully setup a websockets subscription with an input ?
bROMBbROM / ❓-help
2y ago
What is the pattern for unsubscribing from a subscription?
reepicheepRreepicheep / ❓-help
3y ago
What i do wrong ?
Answer OverflowAAnswer Overflow / ❓-help
3y ago
subscription
Ahmed EidAAhmed Eid / ❓-help
4y ago