graphql-modules
graphql-modules copied to clipboard
Per-message ProviderScope for Websockets
It looks like ProviderScope.Session is kept on memory for the whole ws life, while instead I need to create a new instance on each ws message in order to be able to use Mikro-ORM with graphql-modules and ws transport: https://github.com/accounts-js/accounts/pull/1003#issuecomment-651710092
I'm creating an Accounts.js adapter for Mikro-ORM and I would like to share the same EntityManager provider (which takes care of forking it on each network request/ws message) with the Accounts.js authentication module, so that the Identity Map gets shared.
Is there anything graphql-modules provides in order to restric the lifespan to ws messages when using a ws transport?