Skip to content

Instantly share code, notes, and snippets.

@ghostdogpr
Last active May 12, 2023 07:29
Show Gist options
  • Save ghostdogpr/e61984d5c2a64b53b76e09d1aadd3bce to your computer and use it in GitHub Desktop.
Save ghostdogpr/e61984d5c2a64b53b76e09d1aadd3bce to your computer and use it in GitHub Desktop.
Test scala cli
//> using dep com.github.ghostdogpr::caliban:2.2.0
import caliban._
import caliban.schema._
case class Queries(books: List[Book]) derives Schema.SemiAuto
case class Book(id: Int, name: String) derives Schema.SemiAuto
val api = graphQL(RootResolver(Queries(Nil)))
println(api.render)
@ghostdogpr
Copy link
Author

scala-cli https://gist.github.com/ghostdogpr/e61984d5c2a64b53b76e09d1aadd3bce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment