Skip to content

Commit 3340e84

Browse files
authored
Bump Caliban to 2.6.0 (#125)
1 parent d66027d commit 3340e84

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

build.sbt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ val zioK8sVersion = "2.1.1"
88
val zioCacheVersion = "0.2.3"
99
val zioCatsInteropVersion = "23.1.0.0"
1010
val sttpVersion = "3.9.3"
11-
val calibanVersion = "2.5.3"
11+
val calibanVersion = "2.6.0"
1212
val redis4catsVersion = "1.5.2"
1313
val redissonVersion = "3.27.1"
1414
val scalaKryoVersion = "1.0.2"
@@ -80,10 +80,7 @@ lazy val manager = project
8080
.settings(
8181
libraryDependencies ++=
8282
Seq(
83-
"com.github.ghostdogpr" %% "caliban" % calibanVersion,
84-
"com.github.ghostdogpr" %% "caliban-quick" % calibanVersion,
85-
"com.github.ghostdogpr" %% "caliban-zio-http" % calibanVersion,
86-
"com.softwaremill.sttp.tapir" %% "tapir-json-zio" % "1.9.8"
83+
"com.github.ghostdogpr" %% "caliban-quick" % calibanVersion
8784
)
8885
)
8986

manager/src/main/scala/com/devsisters/shardcake/Server.scala

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package com.devsisters.shardcake
22

3-
import caliban.interop.tapir.WebSocketInterpreter
4-
import caliban.{ QuickAdapter, ZHttpAdapter }
3+
import caliban.QuickAdapter
54
import caliban.wrappers.Wrappers.printErrors
6-
import sttp.tapir.json.zio._
75
import zio.http.{ Server => ZServer, _ }
86
import zio._
97

@@ -16,12 +14,11 @@ object Server {
1614
for {
1715
config <- ZIO.service[ManagerConfig]
1816
interpreter <- (GraphQLApi.api @@ printErrors).interpreter
19-
apiHandler = QuickAdapter(interpreter).handlers.api
17+
handlers = QuickAdapter(interpreter).handlers
2018
routes = Routes(
2119
Method.ANY / "health" -> Handler.ok,
22-
Method.ANY / "api" / "graphql" -> apiHandler,
23-
Method.ANY / "ws" / "graphql" ->
24-
ZHttpAdapter.makeWebSocketService(WebSocketInterpreter(interpreter))
20+
Method.ANY / "api" / "graphql" -> handlers.api,
21+
Method.ANY / "ws" / "graphql" -> handlers.webSocket
2522
) @@ Middleware.cors
2623
_ <- ZIO.logInfo(s"Shard Manager server started on port ${config.apiPort}.")
2724
nothing <- ZServer

0 commit comments

Comments
 (0)