FlacheQL- fast client-side caching on super/subset queries for GraphQL

5 points by anoblegoodman ↗ HN
Current solutions for client-side caching in GraphQL are slow, heavy, and often come with a lot of functionality that may be undesirable if you are looking for a caching-only package that aims to decrease loading time. We are excited to release FlacheQL 2.0, a ‘smart’ client-side caching solution.

FlacheQL 2.0 returns subsets from cached data based on the query’s parameters. For example, if you send a query to the Yelp GraphQL endpoint for 20 businesses, and then you send one for 15 businesses, as long as the parameters match, FlacheQL 2.0 will return that subset directly from the cache. Additionally, if you were to query for 20 businesses and then subsequently 25 businesses, FlacheQL 2.0 will retrieve the set of 20 from the cache, restructure the query so that it only pings the server for the remaining 5, and stitch the two responses back together to send the response to the client. This reduces the load on your server from GraphQL resolvers, and speeds up loading time in your application. This new release also includes cache persistence via IndexedDB and TTL cache expiration.

We have seen a substantial decrease in page load times relative to other caching libraries. Check out the demo app if you’re curious to see how we stack up against Apollo—we have query timers on there for comparison purposes. Check it out here: http://www.flacheql.io.

We’d love to hear your feedback about our library, available on npm. This is a work in progress so please feel free to contribute or raise issues as you see fit. You can also download the nom package, and star the repository here: https://github.com/FlacheQL/FlacheQL. Thanks!

2 comments

[ 3.1 ms ] story [ 17.7 ms ] thread
I was just reading about some updates to URQL (another GraphQL client alternative to Apollo) from Formidable Labs. I'm happy to see more activity in this space after spending the last week wrestling with Apollo's API...

Will check this out later today, the partial fulfillment of outbound queries with cached data sounds interesting and I'm wondering how you might have implemented it.

Down to check it out some good alternatives. Is it compatible with PWA since it uses local IndexedDB?