feat(@nestjs/graphql): allow custom WebSocket server in subscriptions config - #4105
feat(@nestjs/graphql): allow custom WebSocket server in subscriptions config#4105wasaybuilds wants to merge 1 commit into
Conversation
|
Opus: Nice feature. One blocking issue, two smaller ones: Blocking - custom server's
No check that the custom server used Also: the new tests fully mock |
… config Allow users to provide a custom WebSocket server instance via the 'server' option in graphql-ws configuration. Closes nestjs#2653
ba5d3cf to
2a1320b
Compare
Thanks for the thorough review @kamilmysliwiec! All points have been addressed:
|
Description
Following the v14 release, this PR adds support for providing a custom WebSocket server instance via the
serveroption in thegraphql-wssubscriptions configuration.When provided,
@nestjs/graphqlwill use the givenWebSocketServerinstance instead of creating the default one.Closes #2653
Motivation
Allows users to pass their own pre-configured WebSocket server instance (e.g. for custom connection handlers, compression settings, or alternative server setups) to
graphql-ws.Types of changes
Checklist: