Websocket don't work #1802
Replies: 4 comments
-
The Bearer-Token is not sending by header. I need the JWT auth on my header... Insomnia and Postman don't works with websocket... Does anyone know any other tool to test graphQL+Bearer with websockets? |
Beta Was this translation helpful? Give feedback.
-
Check out this example to get Websockets working https://github.com/99designs/gqlgen/blob/master/example/chat/server/server.go#L32-L43 |
Beta Was this translation helpful? Give feedback.
-
Yes, it' work, also by me too... But nothing with authenticate... The Playground send not header with Bearer-token..., this ist the problem. The Postman have websocket in beta, but send a header with Websocket: Gqlgen run with websocket, my JWT-Auth is too mutch for playground. |
Beta Was this translation helpful? Give feedback.
-
That's because you need to set your headers to I am using gofiber:
By the way, you don't need to do that when using Safari (it will work without it). However, in Chrome and Edge, won't work. Chrome won't report the correct error in the Console, and Edge does report it correctly. |
Beta Was this translation helpful? Give feedback.
-
versions
gqlgen version
? 0.13.0go version
? go1.16.3Playground says
I don't know to use this case. What is the problem? All other requests, querys, mutations, run with no problems!
Beta Was this translation helpful? Give feedback.
All reactions