Skip to content

Instantly share code, notes, and snippets.

@stubailo
Created February 16, 2017 16:27
Show Gist options
  • Select an option

  • Save stubailo/76e63c2f7ae17e16540c53908e1a836e to your computer and use it in GitHub Desktop.

Select an option

Save stubailo/76e63c2f7ae17e16540c53908e1a836e to your computer and use it in GitHub Desktop.
Subscription request and results
// Result 1
{
"data": {
"commentAdded": {
"comment": {
"id": "abc123",
"content": "GraphQL subscriptions will be awesome!",
"author": { "username": "sashko" }
}
}
}
}
// Result 2
{
"data": {
"commentAdded": {
"comment": {
"id": "def456",
"content": "We should have a good RFC discussion!",
"author": { "username": "robzhu" }
}
}
}
}
subscription {
commentAdded(postId: "ac55aa55") {
comment {
id
content
author { username }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment