Skip to content

Commit

Permalink
use RC7 methods
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpdaniels committed May 19, 2024
1 parent 358b0c5 commit cc709ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions apollo-compatibility/src/main/scala/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import caliban.CalibanError
import zio._
import caliban.quick._
import services.{ InventoryService, ProductService, UserService }
import zio.http.Server
import zio.http.{ Response, Routes, Server }

object Main extends ZIOAppDefault {

Expand All @@ -14,14 +14,14 @@ object Main extends ZIOAppDefault {
})
} yield ()

val printSchema = Console.printLine(ProductSchema.print)
private val printSchema = Console.printLine(ProductSchema.print)

val runServer = {
val server: ZIO[
ProductService with UserService with InventoryService with Server,
CalibanError.ValidationError,
Int
] = (ProductSchema.api.toApp("/graphql") flatMap Server.serve)
private val runServer = {
val routes: Task[Routes[ProductService with UserService with InventoryService, Response]] =
ProductSchema.api.routes("/graphql")

val server: ZIO[ProductService with UserService with InventoryService with Server, Throwable, Response] =
routes.flatMap(Server.serve(_))

server.orDie
.provide(
Expand Down
5 changes: 3 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ lazy val rootJVM213 = project
ideSkipProject := true
)
.aggregate({
val excluded: Set[ProjectReference] = Set(clientJS, clientNative, clientLaminext, codegenSbt, apolloCompatibility)
val excluded: Set[ProjectReference] = Set(clientJS, clientNative, clientLaminext, codegenSbt)
allProjects.filterNot(excluded.contains)
} *)

Expand All @@ -141,7 +141,8 @@ lazy val rootJVM3 = project
ideSkipProject := true
)
.aggregate({
val excluded: Set[ProjectReference] = Set(clientJS, clientNative, clientLaminext, codegenSbt, akkaHttp)
val excluded: Set[ProjectReference] =
Set(clientJS, clientNative, clientLaminext, codegenSbt, akkaHttp, apolloCompatibility)
allProjects.filterNot(excluded.contains)
} *)

Expand Down

0 comments on commit cc709ce

Please sign in to comment.