andyrichardson / subscriptionless

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

Optimize execution of user event handlers #10

Open andyrichardson opened 3 years ago

andyrichardson commented 3 years ago

About

For now, all user-provided event handlers are executed sequentially.

await onSubscribe(); // User side-effect - blocking
// ...
// subscriptionless handling logic

It would be nice to have the option between:

Note: onConnectionInit handler should always be executed sequentially for authentication purposes