DEV Community

loading...

Discussion on: Create a real time web app with Hasura and Gatsby

Collapse
hub_tent profile image
Tent hub

Hello Vladimir
Nice video. I was a bit confused about the WebSocket part of the video, though it was cool. So I tried to implement the exact same code not understanding it with my own Hasura endpoint and headers. And of course I have errors:

failed: WebSocket is closed before the connection is established.

Everything is exactly the same. Like a copy, paste and change the variables scenario.

on the terminal

success Build manifest and related icons - 0.252s
success onPostBootstrap - 0.291s

info bootstrap finished - 10.426 s

success run queries - 0.087s - 9/9 103.14/s

{ [Function: WebSocket]
CONNECTING: 0,
OPEN: 1,
CLOSING: 2,
CLOSED: 3,
createWebSocketStream: [Function: createWebSocketStream],
Server: [Function: WebSocketServer],
Receiver: [Function: Receiver],
Sender: [Function: Sender] }

wss://hasura-gatsby-livestream.herokuapp.com/v1alpha1/graphql

Your Gatsby GraphQL Playground is running on http://[YOUR_LOCALHOST]/___playground

You can now view DigitalTentHub in the browser.

localhost:8000/