Home

Awesome

GraphQL subscription example

Build Status

This application uses:

Pre-requisites

Requires Go 1.11.x or above, which support Go modules. Read more about them here.

Remember to set GO111MODULE=on

How to use

Run the application:

go run main.go

Navigate to localhost:8080 and use GraphiQL to subscribe using the following example:

subscription onHelloSaid {
  helloSaid {
    id
    msg
  }
}

On a separate tab run:

mutation SayHello{
  sayHello(msg: "Hello world!") {
    id
    msg
  }
}