An open API service indexing awesome lists of open source software.

https://github.com/bugthesystem/dataloader

DataLoader is a generic utility to be used as part of your application's data fetching layer to provide a consistent API over various backends and reduce requests to those backends via batching and caching.
https://github.com/bugthesystem/dataloader

Last synced: 7 months ago
JSON representation

DataLoader is a generic utility to be used as part of your application's data fetching layer to provide a consistent API over various backends and reduce requests to those backends via batching and caching.

Awesome Lists containing this project

README

          

# DataLoader

> DataLoader is a generic utility to be used as part of your application's data fetching layer to provide a consistent API over various backends and reduce requests to those backends via batching and caching.

### Usage

```scala
val loader = new DataLoader[Int, Int](
batchLoadFn = keys: Array[Int] => Some(Promise().success(keys))
)

val f = loader.load(1)

val result = Await.result(f, 1.seconds)

println(s"Resolved value: $result")
```

### Credits
> https://github.com/facebook/dataloader

@z i λ a s a l