I’m having a problem getting my static react website to talk to a postgraphile graphql service I have set up running with node express.
The graphql querying over the https link I have set up as an environment variable seems to be working fine. However the subscription service, which has been working fine locally, fails to connect when I changed it from ws to wss as an environment variable, i.e:-
works fine. However:-
I came across this discussion:-
which I thought may be quite useful in suggestions the base URL was required, i.e. wss://game-tokens-graphql.onrender.com, but that hasn’t worked either.
Has anyone been able to get graphql subscriptions working here?
I’m wondering if it is something simple like leaving the REACT_APP_GRAPHQL_WS variable pointing at the base onrender URL and adding a redirect to “/graphql” in my express service? Or maybe it’s an issue with my port in express - I was using 5000 testing locally but does it need to be set to 443!
Thanks for reading. Would appreciate any help if anyone else has had a similar problem.