Closed asadDev02 closed 3 months ago
Hey @Muhammad-Asad-Mughal 👋
Unfortunately its very difficult to understand what the issue is without a runnable reproduction or access to your server.
GraphQLWsLink
is just a small wrapper around the graphql-ws
client to be able to subscribe and send updates back through the link chain, but it doesn't do any of the network stuff itself. For that, you'll need to debug why your graphql-ws
client isn't able to connect.
A couple things to check on your end:
/graphql
connectionParams
on your graphql-ws
client to send any auth tokens you may need (note that headers
aren't available here)graphql-ws
protocol (this is usually handled for you if you're using a graphql-ws
server package on your server) Since this isn't an issue with Apollo Client, I'm going to go ahead and close this issue. Hopefully you're able to figure out why your websocket endpoint won't connect. Please let me know if I've made a mistake and I'd be happen to open this again. Thanks!
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. For general questions, we recommend using StackOverflow or our discord server.
getting this issue
WebSocket connection to ‘ws://localhost:4000/graphql’ failed: (anonymous) @ graphql-ws.js?v=0002dea8:332 Show 1 more frame Show lessUnderstand this error index.tsx:30 data: undefined