Skip to content
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

feat(server): Add onDisconnect callback #94

Merged
merged 5 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: add note
  • Loading branch information
enisdenjo committed Jan 12, 2021
commit b6f5f5f3a85fad1b704be61ffe3f658c8ba674f4
3 changes: 3 additions & 0 deletions docs/interfaces/_server_.serveroptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ whatever reason. Provides the close event too. Beware
that this callback happens AFTER all subscriptions have
been gracefuly completed.

If you are interested in tracking the subscriptions completions,
consider using the `onComplete` callback.

___

### onError
Expand Down
3 changes: 3 additions & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ export interface ServerOptions<E = unknown> {
* whatever reason. Provides the close event too. Beware
* that this callback happens AFTER all subscriptions have
* been gracefuly completed.
*
* If you are interested in tracking the subscriptions completions,
* consider using the `onComplete` callback.
*/
onDisconnect?: (
ctx: Context<E>,
Expand Down