Skip to content

Commit

Permalink
Upgrade http4s (#1001)
Browse files Browse the repository at this point in the history
* Upgrade http4s

* Simplify
  • Loading branch information
ghostdogpr authored Aug 7, 2021
1 parent e1fa99a commit 1add287
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions adapters/http4s/src/main/scala/caliban/Http4sAdapter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import cats.effect.kernel.Async
import cats.effect.std.{ Dispatcher, Queue => CatsQueue }
import cats.~>
import fs2.{ Pipe, Stream }
import fs2.text.utf8Decode
import fs2.text.utf8
import fs2.io.file.Files
import io.circe.Decoder.Result
import io.circe.{ DecodingFailure, Json }
Expand Down Expand Up @@ -139,7 +139,7 @@ object Http4sAdapter {
random.nextUUID.flatMap { uuid =>
val path = rootUploadPath.resolve(uuid.toString)
p.body
.through(Files[RIO[R, *]].writeAll(path))
.through(Files[RIO[R, *]].writeAll(fs2.io.file.Path.fromNioPath(path)))
.compile
.drain
.as((n, path.toFile -> p))
Expand Down Expand Up @@ -192,7 +192,7 @@ object Http4sAdapter {
val optOperations =
m.parts.find(_.name.contains("operations")).traverse {
_.body
.through(utf8Decode)
.through(utf8.decode)
.compile
.foldMonoid
.flatMap(body => Task.fromEither(parseGraphQLRequest(body)))
Expand All @@ -202,7 +202,7 @@ object Http4sAdapter {
val optMap =
m.parts.find(_.name.contains("map")).traverse {
_.body
.through(utf8Decode)
.through(utf8.decode)
.compile
.foldMonoid
.flatMap { body =>
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ val akkaVersion = "2.6.15"
val catsEffect2Version = "2.5.3"
val catsEffect3Version = "3.2.2"
val circeVersion = "0.14.1"
val http4sVersion = "0.23.0"
val http4sVersion = "0.23.1"
val laminextVersion = "0.13.10"
val magnoliaVersion = "0.17.0"
val mercatorVersion = "0.2.1"
Expand Down

0 comments on commit 1add287

Please sign in to comment.