I get error Invalid WebSocket implementation provided and I have tried with different version of dependencies. When I remove webSocketImpl I can establish websocket connection but when I send subscription request I have Error: Socket closed with event 1011 Internal Error error
One of my teammate has a successful experience with subscriptions-transport-ws as it is no longer actively maintained I don’t like to use it for our production
When I change ws import to import { WebSocket } from 'ws' I don’t have Invalid WebSocket implementation provided error anymore instead I have Socket closed with event 1011 Internal Error
Sorry you have run into errors. I updated the graphQL subscription example NodeJS code with what is needed in the package.json and improved imports, which should solve the problems for you.
The updated example should run if you follow the following steps:
Create a directory and add package.json to the directory with the following:
Thank you @kkoechley for your time and nice responses
I have done the instruction in this code sandbox you can see Invalid WebSocket implementation provided error and again if we change webSocketImpl: ws to webSocketImpl: ws.Websocket we have error 1011
The other problem is, I use "graphql": "^16.7.1" in my project and cannot downgrade it to "graphql": "^15.5.0"
About subscriptions-transport-ws : It seems it dosen’t work anymore and in the recent update of Bluescape something is updated or broken
WebSocket connection to 'wss://api.apps.us.bluescape.com/v3/graphql' failed: WebSocket is closed before the connection is established.