Repository navigation
feat(server + client): add support for server-sent events (SSE) - #5713
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
juliusmarminge
left a comment
There was a problem hiding this comment.
lots of unfamiliar stuff so my review should be taken lightly but couldn't find anything obvious that stands out
This reverts commit b08d480.
…se-backup # Conflicts: # package.json # pnpm-lock.yaml
| yield { | ||
| id, | ||
| data: Object.keys(who).filter( | ||
| (user) => user !== opts.ctx.session?.user?.name, | ||
| ), | ||
| } satisfies SSEvent; |
There was a problem hiding this comment.
What would you think about letting you yield anything and have a special function when you wanna yield SSEvent?
e.g.
yield { foo: "bar" }then data would simply be "bar"
and doing eg
yield sseEvent({
id: 1,
foo: "bar",
})if you wanna yield a "proper" SSE event
There was a problem hiding this comment.
I like that though instead of sseEvent, how about just sse or ssEvent or serverSentEvent?
There was a problem hiding this comment.
sure, not bothered about the naming
|
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
🎯 Changes
Adds a
httpSubscriptionLinkusing server-sent events (SSE)Docs: https://www-git-05-10-subscriptions-sse-trpc.vercel.app/docs/client/links/httpSubscriptionLink
✅ Checklist