Fetch v1.0.0 released
by Maureen Elsberry
- •
- February 26, 2019
- •
- scala• open source• fetch• data
- |
- 2 minutes to read.

We’ve been hinting at a major redesign of the Fetch library in terms of cats-effect abstractions for awhile now, and finally, we can announce the release of v1.0.0. Fetch is an open source library for simple and efficient data access for Scala and Scala.js.
It’s a backwards-incompatible release that introduces numerous breaking changes as well as a couple of new features. It now should be easier to use and require less work from the user of the library, especially when you are already using cats-effect.
Breaking changes
- Introduced the
Data
typeclass to identify requests to a data source - Redesigned
DataSource
to take an extraF[_]
type parameter - Renamed
fetchOne
tofetch
andfetchMany
tobatch
- Data sources now can be implicitly constructed
- Automatic parallel implementation of
DataSource#batch
in terms ofConcurrentEffect[F]
- Removed
FetchMonadError
, a Fetch is now interpreted to aConcurrentEffect
- Removed
Query
, a data source now returns aF
that has an implicitConcurrentEffect[F]
- Renamed
DataSourceCache
toDataCache
, it now takes aData
instance as a parameter for insert and lookup and is parameterized to F - Renamed
Env
toLog
New features
- Introduced
Fetch#optional
, an alternative toFetch#apply
for optional fetches - Different Data Sources now can have the same identity and result types
API changes
Fetch#run
now requires aTimer[F]
andContextShift[F]
fromcats-effect
Fetch#apply
no longer requires an implicitDataSource
and must be passed explicitly- Renamed
Fetch#runEnv
toFetch#runLog
Fetch#traverse
,Fetch#sequence
,Fetch#join
&Fetch#collect
deleted in favor of using cats typeclass ops
Documentation
- Proof-of-concept Redis cache implementation of
DataCache
- #161 - Removed Monix, Future and Twitter Future subprojects, most of them should work with
cats-effect
abstractions already - GrapQL query interpreter example - #178
- Example using Monix Scheduler and Task to run fetches - #178
Massive thanks to Alejandro Gomez for all his work on the library and the rest of the Fetch contributors for helping get this project to where it is today.
Join us in the Fetch Gitter channel for questions, comments, or to get started contributing.