-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump Caliban to 2.6.0 #125
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
@@ -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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think caliban-quick depends on jsoniter so we can get rid of this too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
) | ||
) | ||
|
||
|
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, _ } | ||
|
@@ -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, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks really clean now 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah it's really nice. The quick adapter has been working really well for us in prod so far too, so pretty confident to make this change in Shardcake as well! :) |
||
Method.ANY / "ws" / "graphql" -> handlers.webSocket | ||
) @@ Middleware.cors | ||
_ <- ZIO.logInfo(s"Shard Manager server started on port ${config.apiPort}.") | ||
nothing <- ZServer | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since caliban-quick depends on caliban, we can actually remove this too and only depend on caliban-quick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sure! I'm just usually wary to use transitive deps, but will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2040ae4