Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 451 Bytes

File metadata and controls

40 lines (30 loc) · 451 Bytes

Complete server example, with query, mutation and subscriptions.

Running

go run main.go -addr :8080

GraphQL endpoint will be available at http://127.0.0.1:8080/query

Navigate to playground on http://127.0.0.1:8080

And try following queries:

subscription {
  fooUpdates
}

Then in new tab(s)

query {
  getFoo
}
mutation {
  setFoo(value: 123)
}
query {
  getFoo
}