File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
manager/src/main/scala/com/devsisters/shardcake Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ val zioK8sVersion = "2.1.1"
8
8
val zioCacheVersion = " 0.2.3"
9
9
val zioCatsInteropVersion = " 23.1.0.0"
10
10
val sttpVersion = " 3.9.3"
11
- val calibanVersion = " 2.5.3 "
11
+ val calibanVersion = " 2.6.0 "
12
12
val redis4catsVersion = " 1.5.2"
13
13
val redissonVersion = " 3.27.1"
14
14
val scalaKryoVersion = " 1.0.2"
@@ -80,10 +80,9 @@ lazy val manager = project
80
80
.settings(
81
81
libraryDependencies ++=
82
82
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" % calibanVersion,
84
+ " com.github.ghostdogpr" %% " caliban-quick" % calibanVersion,
85
+ " com.softwaremill.sttp.tapir" %% " tapir-json-zio" % " 1.9.8"
87
86
)
88
87
)
89
88
Original file line number Diff line number Diff line change 1
1
package com .devsisters .shardcake
2
2
3
- import caliban .interop .tapir .WebSocketInterpreter
4
- import caliban .{ QuickAdapter , ZHttpAdapter }
3
+ import caliban .QuickAdapter
5
4
import caliban .wrappers .Wrappers .printErrors
6
5
import sttp .tapir .json .zio ._
7
6
import zio .http .{ Server => ZServer , _ }
@@ -16,12 +15,11 @@ object Server {
16
15
for {
17
16
config <- ZIO .service[ManagerConfig ]
18
17
interpreter <- (GraphQLApi .api @@ printErrors).interpreter
19
- apiHandler = QuickAdapter (interpreter).handlers.api
18
+ handlers = QuickAdapter (interpreter).handlers
20
19
routes = Routes (
21
20
Method .ANY / " health" -> Handler .ok,
22
- Method .ANY / " api" / " graphql" -> apiHandler,
23
- Method .ANY / " ws" / " graphql" ->
24
- ZHttpAdapter .makeWebSocketService(WebSocketInterpreter (interpreter))
21
+ Method .ANY / " api" / " graphql" -> handlers.api,
22
+ Method .ANY / " ws" / " graphql" -> handlers.webSocket
25
23
) @@ Middleware .cors
26
24
_ <- ZIO .logInfo(s " Shard Manager server started on port ${config.apiPort}. " )
27
25
nothing <- ZServer
You can’t perform that action at this time.
0 commit comments