QLutch

A lightweight caching solution for graphQL APIs

MIT License

Stars
54
Committers
5

QLutch

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


Features

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

Dashboard Visualizer

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