Skip to content

Latest commit

 

History

History

graphql-hasura-subscriptions

WunderGraph subscriptions example - graphql-hasura

Configuration

You will need to complete a simple signup form (just mail and password) to get access to the GraphiQL interface, and obtain token. Make sure you copy the entire token, since it overflows its bounding box.

  • Copy .env.example to .env
  • Set your token as HASURA_AUTH_TOKEN=your_token (e.g. Bearer ey...)

Getting started

npm install && npm start

Check results

curl -N http://localhost:9991/operations/Users
curl -N http://localhost:9991/operations/Todo

SSE output

 curl -N http://localhost:9991/operations/Users\?wg_sse\=true

TS operation

curl -N http://localhost:9991/operations/users/get?id=1

Playground

Use https://hasura.io/learn/graphql/graphiql to add new users and todos, and explore schema. Add new operations to the .wundergraph/operations folder and run npm start to see the results.

Learn More

Read the Docs.

Deploy to WunderGraph Cloud

Deploy to WunderGraph

Got Questions?

Join us on Discord!