The big release of the week is called ZQuery
! If you’re familiar with the GraphQL library Caliban
, you may have already heard of it: ZQuery is a new data type designed for optimizing queries. Imagine you have a computation that contains multiple requests to a backend (a DB, an API, whatever): using ZQuery allows you to cache, de-duplicate and batch requests together in a seamless way using a syntax that is very similar to ZIO.
Originally developed by Adam Fraser inside the Caliban repository, ZQuery is now available for usage in any context. There aren’t many resources yet but this should come soon, and Adam is planning to give a talk on it in the near future. In the meantime, you can check this blog post
showing how it’s used for optimizing GraphQL queries in Caliban.