I want to create a graphql endpoint using caliban:
It only works with zio but my project uses cats.
Is it possible without a full refactor of my endpoints?
I want to create a graphql endpoint using caliban:
It only works with zio but my project uses cats.
Is it possible without a full refactor of my endpoints?
I think that’s more of a caliban question - the document you linked seems to describe interop with cats-effect?
You could also in theory translate a ServerEndpoint[Any, IO]
to ServerEndpoint[Any, ZIO]
, but it might be quite inefficient - as you’ll be using both the cats-effect & ZIO runtimes. You’d “just” need a function IO[T] => ZIO[T]
, and then you can create a zio-server-endpoint from an io-server-endpoint using ServerEndpoint.apply
Yes, it describes how to interop Caliban with cats but it doesn’t work with tapir.
It looks like I will need to abstract the effect type all the way down.
Thanks for the response