Skip to content

Commit

Permalink
Merge branch 'ghostdogpr:series/2.x' into series/2.x_validate_graphql…
Browse files Browse the repository at this point in the history
…_schema
  • Loading branch information
develeon authored Sep 13, 2024
2 parents ef02202 + e3ec8dd commit 5bbb8f9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 31 deletions.
9 changes: 0 additions & 9 deletions adapters/quick/src/main/scala/caliban/QuickAdapter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ final class QuickAdapter[R] private (requestHandler: QuickRequestHandler[R]) {
Routes.fromIterable(apiRoutes ::: graphiqlRoute ::: uploadRoute ::: wsRoute)
}

@deprecated("Use `routes` instead", "2.6.1")
def toApp(
apiPath: String,
graphiqlPath: Option[String] = None,
uploadPath: Option[String] = None,
webSocketPath: Option[String] = None
): HttpApp[R] =
HttpApp(routes(apiPath, graphiqlPath, uploadPath, webSocketPath))

/**
* Runs the server using the default zio-http server configuration on the specified port.
* This is meant as a convenience method for getting started quickly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ final private class QuickRequestHandler[R](
.mapConcatChunk(Chunk.fromArray)
}

private def encodeTextEventStream(resp: GraphQLResponse[Any])(implicit trace: Trace): UStream[ServerSentEvent] =
private def encodeTextEventStream(
resp: GraphQLResponse[Any]
)(implicit trace: Trace): UStream[ServerSentEvent[String]] =
ServerSentEvents.transformResponse(
resp,
v => ServerSentEvent(writeToString(v), Some("next")),
Expand Down
16 changes: 0 additions & 16 deletions adapters/quick/src/main/scala/caliban/quick/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,6 @@ package object quick {
)
)

@deprecated("use `routes` instead", "2.6.1")
def toApp(
apiPath: String,
graphiqlPath: Option[String] = None,
uploadPath: Option[String] = None,
webSocketPath: Option[String] = None
)(implicit trace: Trace): IO[CalibanError.ValidationError, HttpApp[R]] =
gql.interpreter.map(
QuickAdapter(_).toApp(
apiPath = apiPath,
graphiqlPath = graphiqlPath,
uploadPath = uploadPath,
webSocketPath = webSocketPath
)
)

/**
* Creates a zio-http handler for the GraphQL API
*
Expand Down
13 changes: 8 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ val catsEffect3Version = "3.5.4"
val catsMtlVersion = "1.3.0"
val circeVersion = "0.14.10"
val fs2Version = "3.11.0"
val http4sVersion = "0.23.27"
val http4sVersion = "0.23.28"
val javaTimeVersion = "2.5.0"
val jsoniterVersion = "2.30.9"
val laminextVersion = "0.17.0"
Expand All @@ -31,7 +31,7 @@ val zioInteropReactiveVersion = "2.0.2"
val zioConfigVersion = "4.0.2"
val zqueryVersion = "0.7.5"
val zioJsonVersion = "0.7.3"
val zioHttpVersion = "3.0.0-RC9"
val zioHttpVersion = "3.0.0"
val zioOpenTelemetryVersion = "3.0.0-RC21"

Global / onChangedBuildSource := ReloadOnSourceChanges
Expand Down Expand Up @@ -211,7 +211,7 @@ lazy val tools = project
.settings(
libraryDependencies ++= Seq(
"org.scalameta" % "scalafmt-interfaces" % scalafmtVersion,
"io.get-coursier" % "interface" % "1.0.19",
"io.get-coursier" % "interface" % "1.0.20",
"com.softwaremill.sttp.client3" %% "zio" % sttpVersion,
"dev.zio" %% "zio-test" % zioVersion % Test,
"dev.zio" %% "zio-test-sbt" % zioVersion % Test,
Expand All @@ -237,7 +237,7 @@ lazy val tracing = project
"dev.zio" %% "zio-opentelemetry" % zioOpenTelemetryVersion,
"dev.zio" %% "zio-test" % zioVersion % Test,
"dev.zio" %% "zio-test-sbt" % zioVersion % Test,
"io.opentelemetry" % "opentelemetry-sdk-testing" % "1.42.0" % Test
"io.opentelemetry" % "opentelemetry-sdk-testing" % "1.42.1" % Test
)
)
.dependsOn(core, tools)
Expand Down Expand Up @@ -749,7 +749,10 @@ lazy val enableMimaSettingsJVM =
Def.settings(
mimaFailOnProblem := enforceMimaCompatibility,
mimaPreviousArtifacts := previousStableVersion.value.map(organization.value %% moduleName.value % _).toSet,
mimaBinaryIssueFilters := Seq()
mimaBinaryIssueFilters := Seq(
ProblemFilters.exclude[DirectMissingMethodProblem]("caliban.quick.*"),
ProblemFilters.exclude[DirectMissingMethodProblem]("caliban.QuickAdapter.*")
)
)

lazy val enableMimaSettingsJS =
Expand Down

0 comments on commit 5bbb8f9

Please sign in to comment.