-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to latest caliban library versions (#575)
- Loading branch information
1 parent
22fd129
commit 77a1980
Showing
6 changed files
with
25 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
import sbt._ | ||
import sbt.* | ||
|
||
version := "2.1.0" | ||
scalaVersion := "2.13.8" | ||
version := "2.4.3" | ||
scalaVersion := "2.13.12" | ||
|
||
val zioJsonV = "0.4.2" | ||
val zioHttpV = "0.0.5" | ||
val calibanV = "2.1.0" //"2.0.1" | ||
val calibanV = "2.4.3" | ||
|
||
libraryDependencies ++= List( | ||
"dev.zio" %% "zio-json" % zioJsonV, | ||
"dev.zio" %% "zio-http" % zioHttpV, | ||
"com.softwaremill.sttp.tapir" %% "tapir-json-zio" % "1.2.11", | ||
"com.github.ghostdogpr" %% "caliban" % calibanV, | ||
"com.github.ghostdogpr" %% "caliban-federation" % calibanV, | ||
"com.github.ghostdogpr" %% "caliban-zio-http" % calibanV | ||
"com.github.ghostdogpr" %% "caliban" % calibanV, | ||
"com.github.ghostdogpr" %% "caliban-quick" % calibanV, | ||
"com.github.ghostdogpr" %% "caliban-federation" % calibanV | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.8.2 | ||
sbt.version=1.9.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
import caliban.ZHttpAdapter | ||
import services.{InventoryService, ProductService, UserService} | ||
import sttp.tapir.json.zio._ | ||
import caliban.quick._ | ||
import services.{ InventoryService, ProductService, UserService } | ||
import zio.Console.printLine | ||
import zio.http.{Server, ServerConfig} | ||
import zio.{ZIOAppDefault, ZLayer} | ||
import zio.ZIOAppDefault | ||
|
||
object Main extends ZIOAppDefault { | ||
override def run = | ||
(for { | ||
_ <- printLine("Starting server") | ||
interpreter <- ProductApi.interpreter | ||
_ <- Server.serve(ZHttpAdapter.makeHttpService(interpreter).withDefaultErrorResponse) | ||
} yield ()).provide( | ||
ZLayer.succeed(ServerConfig.default.port(4001)), | ||
Server.live, | ||
ProductService.inMemory, | ||
UserService.inMemory, | ||
InventoryService.inMemory | ||
) | ||
printLine("Starting server") *> | ||
ProductApi.graphql | ||
.runServer(4001, "/") | ||
.provide( | ||
ProductService.inMemory, | ||
UserService.inMemory, | ||
InventoryService.inMemory | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters