Skip to content

Instantly share code, notes, and snippets.

@DGolubets
DGolubets / caliban_hangs.scala
Last active July 18, 2024 16:28
Caliban interpreter hangs
//> using scala 3.4.2
//> using dep com.github.ghostdogpr::caliban:2.8.1
//> using dep com.github.ghostdogpr::caliban-quick:2.8.1
import zio.*
import zio.query.ZQuery
import caliban.*
import caliban.schema.Schema.auto.*
import caliban.quick.*
@DGolubets
DGolubets / scala_cats_di.scala
Created August 9, 2024 22:50
Scala DI wth implicits and Cats
//> using toolkit typelevel:default
import cats.effect.*
object Hello extends IOApp.Simple:
def run =
val server = for {
given Database <- Postgres.build
given UserRepo <- DefaultUserRepo.build
given UserService <- DefaultUserService.build