New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ping/pong for SSE #2150
Ping/pong for SSE #2150
Conversation
🦋 Changeset detectedLatest commit: a926e97 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@graphql-yoga/common |
3.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
graphql-yoga |
3.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/node |
3.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-apollo-inline-trace |
1.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-apq |
1.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-defer-stream |
1.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-disable-introspection |
0.1.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-persisted-operations |
1.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-prometheus |
1.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-response-cache |
1.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-sofa |
1.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/render-graphiql |
3.2.0-alpha-20221226105640-ddc717ce |
npm ↗︎ unpkg ↗︎ |
✅ Benchmark Results
|
🚀 Website PreviewThe latest changes to the website are available as preview in: https://6d94281b.graphql-yoga.pages.dev |
9f658b5
to
ae159f7
Compare
Co-authored-by: Denis Badurina <badurinadenis@gmail.com>
Thank you for this ❤️ |
pingInterval = setInterval(() => { | ||
if (!controller.desiredSize) { | ||
clearInterval(pingInterval) | ||
return | ||
} | ||
controller.enqueue(textEncoder.encode(':\n\n')) | ||
}, timeoutInSeconds * 1000) as unknown as number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be based on the last emitted value instead? 12 seconds since the last message got sent to the client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm makes sense to me. Let's do that.
Closes #2095