-
Did anyone try to use Apollo's subscriptions via graphql-ws as per their documentation but leveraging Vite's proxy? Proxying the common graphql query with httpLink works like charm. But creating a wsClient always fails with an error: My vite.config:
My apollo client setup:
|
Beta Was this translation helpful? Give feedback.
Answered by
enisdenjo
Mar 13, 2024
Replies: 1 comment
-
WebSockets URL must specify the scheme ( If your Vite is at port 5173, the URL should then be |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
enisdenjo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WebSockets URL must specify the scheme (
ws://
) and must be absolute (see MDN here).If your Vite is at port 5173, the URL should then be
ws://localhost:5173/ws
.