We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to upgrade caliban to 1.3.0. Found that ContextWrapper disappeared and RequestInterceptor takes its place.
My use case is to extract context from request and provide it as ZIO environment:
def contextExtractor(log: Logging.Service): ContextWrapper[World, HttpResponse] = new ContextWrapper[World, HttpResponse] { override def apply[R1 <: World, A1 >: HttpResponse](ctx: RequestContext)(effect: URIO[R1, A1]): URIO[R1, A1] = { for { world <- ZIO.service[World.Service] ctx = AkkaRequestContextReader.readFrom(ctx.request) braveNewWorld <- world.withContext(ctx) res <- effect.provideSomeLayer[R1](ZLayer.succeed(braveNewWorld)) } yield res } }
RequestInterceptor doesn't have access to effect so the only solution I see is to pass information via FiberRef. Downside
Can we make RequestInterceptor behave like the old ContextWrapper?
The text was updated successfully, but these errors were encountered:
Good point! I restored that capability in #1208
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
I'm trying to upgrade caliban to 1.3.0.
Found that ContextWrapper disappeared and RequestInterceptor takes its place.
My use case is to extract context from request and provide it as ZIO environment:
RequestInterceptor doesn't have access to effect so the only solution I see is to pass information via FiberRef. Downside
Can we make RequestInterceptor behave like the old ContextWrapper?
The text was updated successfully, but these errors were encountered: