WebSocket connection failed: Error during WebSocket handshake: Unexpected response code: 400

后端 未结 16 1448
攒了一身酷
攒了一身酷 2020-12-04 21:08

I am trying to integrate Socket.io with Angular and I\'m having difficulties making a connection from the client-side to the server. I\'ve looked through other related quest

16条回答
  •  温柔的废话
    2020-12-04 21:31

    Using Apollo Server 2.

    Per https://github.com/apollographql/apollo-client/issues/4778#issuecomment-509638071, this solved my problem:

    try 'ws://localhost:4000/graphql'

    ...since incoming and outgoing requests now use the same address.

提交回复
热议问题