andyrichardson / subscriptionless

GraphQL subscriptions (and more) on serverless infrastructure
MIT License
93 stars 3 forks source link

Context connectionId #19

Closed reconbot closed 3 years ago

reconbot commented 3 years ago

I'd like the connectionId to always be availble in the context if possible, so I can do tracking of connections to auth information in the connectionParams.

andyrichardson commented 3 years ago

Thanks for the suggestion!

so I can do tracking of connections to auth information in the connectionParams

I think what you're looking for might be the onConnectionInit event. That's the point in time where auth typically takes place and the returned data from the handler will be persisted alongside the subscription.

andyrichardson commented 3 years ago

@reconbot I'm going to close this for now but let me know if the issue isn't resolved