/QLutch

A lightweight caching solution for graphQL APIs

Primary LanguageJavaScriptMIT LicenseMIT

QLutch

alt text

A lightweight caching solution for graphQL APIs that interfaces with Redis for high-speed data retrieval, combined with performance visualization.

JavaScript NodeJS Express.js TypeScript Jest Redis GraphQL React MongoDB


Features

  • Redis cache integration for graphQL queries and Create mutations.
  • Performance monitor.

alt text

Dashboard Visualizer

alt text

Usage Notes

  • Caching support for Update and Delete mutations is not yet implemented.

Installation

  • User creates application and installs qlutch dependency via npm (npm install qlutch)
  • Set up Redis database in application
  • Require qlutch and Redis in server file
  • For the dashboard visualizer, add express static path to node modules: alt text
  • For the dashboard visualizer, add a dashboard endpoint with a path to the qlutch dist index file: alt text
  • Need two endpoints – one for qlutch and one for graphql. Install qlutch as middleware in qlutch endpoint – pass in “graphql” endpoint and redis instance as arguments. User would need to return res.locals.response: alt text
  • Fetch requests on frontend will need to be made to /qlutch endpoint

Authors

Acknowledgements