[ANN] superlifter - DataLoader for Clojure

168 views
Skip to first unread message

Oliver Hine

unread,
Feb 19, 2020, 5:14:13 PM2/19/20
to Clojure
Hi everyone,

I am pleased to announce the first release of superlifter.

Superlifter is an implementation of DataLoader for Clojure.

To quote from the DataLoader readme:

DataLoader allows you to decouple unrelated parts of your application without sacrificing the performance of batch data-loading. While the loader presents an API that loads individual values, all concurrent requests will be coalesced and presented to your batch loading function. This allows your application to safely distribute data fetching requirements throughout your application and maintain minimal outgoing data requests.

Superlifter uses Urania, a remote data access library for Clojure/script inspired by Haxl which in turn inspired DataLoader. Urania allows batching of similar fetches and deduplication via caching of identical fetches.

Superlifter adds smooth integration with libraries like lacinia, where GraphQL resolvers are run independently and must return data (or promises of data), leading to 1+n problems which can otherwise only be resolved by prefetching which complicates code.

There is a readme and an example project for a Lacinia GraphQL server at the repo on Github https://github.com/oliyh/superlifter

Feedback appreciated, as always, here or on Github.

Cheers,
Oliy

Ag Ibragimov

unread,
Feb 21, 2020, 9:42:54 PM2/21/20
to clo...@googlegroups.com

This looks absolutely mind-blowing and incredible! Thank you!

On Wed 19 Feb 2020 at 14:14, Oliver Hine <oliy...@gmail.com> wrote:

> Hi everyone,
>
> I am pleased to announce the first release of superlifter
> <https://github.com/oliyh/superlifter>.
>
> Superlifter is an implementation of DataLoader
> <https://github.com/graphql/dataloader> for Clojure.
>
> To quote from the DataLoader readme:
>
> DataLoader allows you to decouple unrelated parts of your application
> without sacrificing the performance of batch data-loading. While the loader
> presents an API that loads individual values, all concurrent requests will
> be coalesced and presented to your batch loading function. This allows your
> application to safely distribute data fetching requirements throughout your
> application and maintain minimal outgoing data requests.
>
> Superlifter uses Urania <https://github.com/funcool/urania>, a remote data
> access library for Clojure/script inspired by Haxl
> <https://github.com/facebook/Haxl> which in turn inspired DataLoader.
> Urania allows batching of similar fetches and deduplication via caching of
> identical fetches.
>
> Superlifter adds smooth integration with libraries like lacinia
> <https://github.com/walmartlabs/lacinia>, where GraphQL resolvers are run

Oliver Hine

unread,
Mar 26, 2020, 10:19:14 AM3/26/20
to Clojure
Hi everyone,

I have published a blog post explaining the use and application of the library: https://juxt.pro/blog/posts/superlifter.html

In writing the blog post I realised the API could be much simpler. I have made some changes and released superlifter 0.1.1 which should be much more straightforward to use.

Thanks,
Oliy
Reply all
Reply to author
Forward
0 new messages