Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1362

Materializer/ActorMaterializer confusion

$
0
0

Hey guys, I’m using the drunk library for graphql queries and its constructor is like this:

object AkkaHttpBackend {
  val ContentTypeHeader = "Content-Type"

  def apply(
    uri: Uri,
    headers: immutable.Seq[HttpHeader] = Nil,
    httpExt: Option[HttpExt] = None
  )(implicit as: ActorSystem, mat: ActorMaterializer): AkkaHttpBackend = {

    val http = httpExt.getOrElse { Http(as) }
    new AkkaHttpBackend(uri, headers, http)
  }
}

My question is, how do I provide an ActorMaterializer to it?

Thanks to the deprecation, I do have an instance of Materializer, but how do I get an instance of ActorMaterializer from that?

In general, how should I use a library which is expecting an instance of ActorMaterializer and not of a Materializer?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1362

Trending Articles