This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GraphQL | |
subscription { | |
filmCreated { | |
id | |
title | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GraphQL | |
query { | |
film(id: 0) { | |
id | |
title | |
actors { | |
id | |
firstName | |
lastName | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GraphQL | |
mutation { | |
createFilm(title: "My Film") { | |
id | |
title | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Instantiate DSL context | |
val context = cinemaContextOf(createKtorAdapter()) | |
launch(Dispatchers.Default) { | |
context.subscription { | |
filmCreated { | |
id() | |
title() | |
} | |
}.subscribe { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"filmCreated": { | |
"id": "4", | |
"title": "My Film" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subscription { | |
filmCreated { | |
id | |
title | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Instantiate DSL context | |
val context = cinemaContextOf(createKtorAdapter()) | |
val result = context.mutation { | |
createFilm(title = "My Film") { | |
id() | |
title() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"createFilm": { | |
"id": "4", | |
"title": "My Film" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation { | |
createFilm(title: "My Film") { | |
id | |
title | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Instantiate DSL context | |
val context = cinemaContextOf(createKtorAdapter()) | |
val result = context.query { | |
film(id = 0L) { | |
id() | |
title() | |
actors { | |
id() | |
firstName() |
NewerOlder