Skip to content

Instantly share code, notes, and snippets.

@ermadmi78
Created October 20, 2021 14:34
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/3db86bcdf8b18da740b821184e9ace5e to your computer and use it in GitHub Desktop.
Save ermadmi78/3db86bcdf8b18da740b821184e9ace5e to your computer and use it in GitHub Desktop.
// Instantiate DSL context
val context = cinemaContextOf(createKtorAdapter())
val result = context.mutation {
createFilm(title = "My Film") {
id()
title()
}
}
result.createFilm.also { film ->
println(film.title)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment