Server-side subscription closure

Hi there, how can I voluntarily close a subscription connection from the server? I want to do this for sessions that are already expired, however because onConnect() only checks the access token once initially, the client is still able to use an expired access token to obtain event payloads from server.

@dendrik-clev you could consider adding whatever additional checks you would like in your resolvers themselves, to prevent operations from running when they shouldn’t (e.g. when an access token expires). If you need a way to add or send access token details through to your resolvers, you can leverage the onOperation hook to help adjust the params that get sent to your resolvers. For example: How to pass in user context? · Issue #188 · apollographql/subscriptions-transport-ws · GitHub