fix(indexer): reconnect GraphQL subscriptions after unexpected WebSocket close (#514) - #582
Merged
Jaydbrown merged 6 commits intoAug 31, 2026
Conversation
Unexpected socket close currently unsubscribes with no onError, so live indexer views freeze after a network drop. These cases fail on main and pin reconnect, cancel-during-backoff, and exhausted retries. Signed-off-by: namdamdoi68-oss <namdamdoi68@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
… close Closes conduit-protocol#514. onclose was calling unsubscribe with no onError. Unexpected close now reports the error and retries with WebSocketRelayer linear backoff, and only tears down after the retry budget or an explicit unsubscribe/cleanup. Signed-off-by: namdamdoi68-oss <namdamdoi68@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
maxReconnectAttempts 0 must report exhaustion and drop the subscription without opening a second socket, matching WebSocketRelayer. Signed-off-by: namdamdoi68-oss <namdamdoi68@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
api.md and the unreleased changelog now describe unexpected-close onError, Relayer-style backoff, and the optional reconnect bounds. Signed-off-by: namdamdoi68-oss <namdamdoi68@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
subscribe() gained public reconnect fields; export GraphQLSubscriptionOptions and related types from the package entry so callers can name them without importing a deep path. Signed-off-by: namdamdoi68-oss <namdamdoi68@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
@namdamdoi68-oss Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #514
GraphQLIndexer.subscribe tore the WebSocket down on any close without calling onError, so live indexer views froze after a blip. Unexpected close now surfaces onError and retries with the same linear backoff as WebSocketRelayer, and only unsubscribes after the retry budget or an explicit unsubscribe. Covered in graphql-indexer-lifecycle tests.