Hello Hot Chocolate Community,
I'm having trouble setting up websockets for my Hot Chocolate GraphQL server in my local environment. I have followed the documentation and added app.UseWebSockets()
to my ASP.NET Core application, which is running on my local machine. However, when I try to connect to the websocket at ws://localhost:7217/graphql/
using wscat
, I get the error "socket hang up". Similarly, when I try to connect from my React app using Apollo Client, I get the error "websocket connection to 'ws://localhost:7217/graphql/ws
' failed".
I would appreciate any help in figuring out what is causing the issue. Here are some additional details:
- I'm using Hot Chocolate version 13
- I'm running the server on macOS and testing with wscat on the command line
- I am starting the server via visual studio for mac
- I have not made any other changes to my application's configuration
- I'm able to make regular HTTP requests to the server and receive valid responses
Thank you for your assistance.