Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select websocket implementation in graphql-ws configuration #2653

Open
1 task done
elibosley opened this issue Feb 14, 2023 · 0 comments
Open
1 task done

Select websocket implementation in graphql-ws configuration #2653

elibosley opened this issue Feb 14, 2023 · 0 comments
Labels

Comments

@elibosley
Copy link

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

I cannot select another websocket implementation for subscriptions, and nest doesn't respect the selected websocket implementation from the adapter settings.

Describe the solution you'd like

I was looking at this file https://github.com/nestjs/graphql/blob/master/packages/graphql/lib/services/gql-subscription.service.ts to see what websocket implementation would be used when enabling graphql-ws - it looks like it defaults to using the "ws" implementation from node (/lib/use/ws).

It would be awesome if we could select which implementation was used, either through the registered adapter in Nest JS or just the ones that are provided by the author of Graphql-ws here: https://github.com/enisdenjo/graphql-ws/tree/master/src/use - which would allow selection of fastify, uWebsockets, or the default node implementation.

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

The node WS implementation is not as performant in my testing as these other libraries. Seems like it might require very little configuration changes to actually swap this library to another from his supported implementations?

Thank you for providing this library, Nest is like a dream come true :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant