I am using graphql-subscriptions
to manage session (rooms).
I have simple application like "chat".
I can send message to chat using:
import { PubSub } from 'graphql-subscriptions';
...
pubSub.publish(triggerName, payload)
I can listen to subscription events..
But I don't know how to properly handle when user left to room (for example closing full browser)...
Is there any "disconnect" event?
I am using nestjs
server and react
with apollo-link-ws
Thank you all.