Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ermadmi78/af3826d04dd0c1b563f8fa012daf2b70 to your computer and use it in GitHub Desktop.
Save ermadmi78/af3826d04dd0c1b563f8fa012daf2b70 to your computer and use it in GitHub Desktop.
Subscription preview
# GraphQL
subscription {
filmCreated {
id
title
}
}
// Kotlin
launch(Dispatchers.Default) {
context.subscription {
filmCreated {
id()
title()
}
}.subscribe {
while (true) {
val result = receive()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment