-
Hello, Your npmjs.com page shows Web Socket servers realized via:
Instead of these, can I use socket.io together with graphql-ws? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Still, you should be able to implement the server on top of Socket.io using |
Beta Was this translation helpful? Give feedback.
-
Hey, saw this issue and wanted to share that a while back I built a GraphQL over Socket.io transport:
Disclaimer that it does not follow the GraphQL over WebSocket Protocol at all. It basically only glues together the graphql-js functionality with Socket.io. I never used it in a large-scale deployment and only for an app that you host for ~15 concurrent users. |
Beta Was this translation helpful? Give feedback.
graphql-ws
and it's accompanying GraphQL over WebSocket Protocol is purely for WebSockets. Since Socket.io leverages more than just WebSockets (HTTP long-polling),graphql-ws
will not be supporting it.Still, you should be able to implement the server on top of Socket.io using
makeServer
(see "Server usage with ws" recipe for a quick start). However, you'll have to implement the client from scratch completely on your own.