Skip to content
New issue

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

Add InjectEnv implicit for cats.effect.IO #2062

Merged
merged 2 commits into from
Jan 13, 2024

Conversation

kyri-petrou
Copy link
Collaborator

When I started using Caliban, I was using it via the cats-effect interop. One of the things that I found confusing / frustrating at the time was that I couldn't use a concrete IO if I wanted to propagate anything in the environment (like a request context). I wasn't very experienced with Scala / ZIO at the time, so it didn't occur to me I could use an IOLocal and create my own InjectEnv.

With this PR, we make it easier for beginners / intermediate users to use concrete cats.effect.IO while also being able to propagate request context across the ZIO / CE boundary

@ghostdogpr
Copy link
Owner

@kyri-petrou
Copy link
Collaborator Author

@ghostdogpr sorry I must have missed the notification on this PR. Done 👍

@kyri-petrou kyri-petrou merged commit c73a6e3 into series/2.x Jan 13, 2024
@kyri-petrou kyri-petrou deleted the contextual-ceIO-interop branch January 13, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants