Skip to content

Commit

Permalink
Bump Caliban to 2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
frekw committed Apr 24, 2024
1 parent d66027d commit 2432898
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
9 changes: 4 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ val zioK8sVersion = "2.1.1"
val zioCacheVersion = "0.2.3"
val zioCatsInteropVersion = "23.1.0.0"
val sttpVersion = "3.9.3"
val calibanVersion = "2.5.3"
val calibanVersion = "2.6.0"
val redis4catsVersion = "1.5.2"
val redissonVersion = "3.27.1"
val scalaKryoVersion = "1.0.2"
Expand Down Expand Up @@ -80,10 +80,9 @@ lazy val manager = project
.settings(
libraryDependencies ++=
Seq(
"com.github.ghostdogpr" %% "caliban" % calibanVersion,
"com.github.ghostdogpr" %% "caliban-quick" % calibanVersion,
"com.github.ghostdogpr" %% "caliban-zio-http" % calibanVersion,
"com.softwaremill.sttp.tapir" %% "tapir-json-zio" % "1.9.8"
"com.github.ghostdogpr" %% "caliban" % calibanVersion,
"com.github.ghostdogpr" %% "caliban-quick" % calibanVersion,
"com.softwaremill.sttp.tapir" %% "tapir-json-zio" % "1.9.8"
)
)

Expand Down
10 changes: 4 additions & 6 deletions manager/src/main/scala/com/devsisters/shardcake/Server.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.devsisters.shardcake

import caliban.interop.tapir.WebSocketInterpreter
import caliban.{ QuickAdapter, ZHttpAdapter }
import caliban.QuickAdapter
import caliban.wrappers.Wrappers.printErrors
import sttp.tapir.json.zio._
import zio.http.{ Server => ZServer, _ }
Expand All @@ -16,12 +15,11 @@ object Server {
for {
config <- ZIO.service[ManagerConfig]
interpreter <- (GraphQLApi.api @@ printErrors).interpreter
apiHandler = QuickAdapter(interpreter).handlers.api
handlers = QuickAdapter(interpreter).handlers
routes = Routes(
Method.ANY / "health" -> Handler.ok,
Method.ANY / "api" / "graphql" -> apiHandler,
Method.ANY / "ws" / "graphql" ->
ZHttpAdapter.makeWebSocketService(WebSocketInterpreter(interpreter))
Method.ANY / "api" / "graphql" -> handlers.api,
Method.ANY / "ws" / "graphql" -> handlers.webSocket
) @@ Middleware.cors
_ <- ZIO.logInfo(s"Shard Manager server started on port ${config.apiPort}.")
nothing <- ZServer
Expand Down

0 comments on commit 2432898

Please sign in to comment.