This release adds new callback events for the subscription client that are useful for debugging and testing.
// OnConnectionAlive event is triggered whenever the WebSocket connection
// receives a connection alive message (differs per protocol)
client.OnConnectionAlive(fn func())
// OnSubscriptionComplete event is triggered when the subscription receives
// a terminated message from the server
client.OnSubscriptionComplete(fn func(sub Subscription))
New settings are also added to control the retry and exit behaviors of the subscription client.
client.WithoutLogTypes(graphql.GQLData, graphql.GQLConnectionKeepAlive).
// the client should exit when all subscriptions were closed, default true
WithExitWhenNoSubscription(false).
// WithRetryStatusCodes allow retrying the subscription connection when receiving one of these codes
// the input parameter can be a number string or range, e.g 4000-5000
WithRetryStatusCodes("4000", "4000-4050")
Changelog
add OnConnectionAlive event to the subscription client (#77) @sermojohn
fix: prevent panic on late message after unsubscribed subscription (#79) @sermojohn
improve the subscription life cycle events and add new settings (#82) @hgiasac
Commits
0acd9d9 improve the subscription life cycle event and add new settings (#82)
3bcda95 fix: prevent panic on late message after unsubscribed (#79)
aa8b2bc feat: provide callback for connection alive messages (#77)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps github.com/hasura/go-graphql-client from 0.9.1 to 0.9.2.
Release notes
Sourced from github.com/hasura/go-graphql-client's releases.
Commits
0acd9d9
improve the subscription life cycle event and add new settings (#82)3bcda95
fix: prevent panic on late message after unsubscribed (#79)aa8b2bc
feat: provide callback for connection alive messages (#77)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)