Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oslabs-beta/qlutch
A lightweight caching solution for graphQL APIs
https://github.com/oslabs-beta/qlutch
caching express-js graphql javascript jest metrics mongodb react redis
Last synced: about 20 hours ago
JSON representation
A lightweight caching solution for graphQL APIs
- Host: GitHub
- URL: https://github.com/oslabs-beta/qlutch
- Owner: oslabs-beta
- License: mit
- Created: 2023-08-18T01:27:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-10T01:51:03.000Z (about 1 year ago)
- Last Synced: 2024-11-12T16:02:43.611Z (about 20 hours ago)
- Topics: caching, express-js, graphql, javascript, jest, metrics, mongodb, react, redis
- Language: JavaScript
- Homepage: http://www.qlutch.dev
- Size: 8.82 MB
- Stars: 54
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QLutch
![alt text](https://github.com/lrod8/Qlutch/blob/main/assets/white-base.svg?raw=true)
A lightweight caching solution for graphQL APIs that interfaces with Redis for high-speed data retrieval, combined with performance visualization.
![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E)
![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)
![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB)
![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge&logo=jest&logoColor=white)
![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?&style=for-the-badge&logo=redis&logoColor=white)
![GraphQL](https://img.shields.io/badge/-GraphQL-E10098?style=for-the-badge&logo=graphql&logoColor=white)
![React](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB)
![MongoDB](https://img.shields.io/badge/MongoDB-%234ea94b.svg?style=for-the-badge&logo=mongodb&logoColor=white)
____
# Features
- Redis cache integration for graphQL queries and *Create* mutations.
- Performance monitor.![alt text](https://github.com/lrod8/Qlutch/blob/main/assets/data_flow_readme.png?raw=true)
## Dashboard Visualizer
![alt text](https://github.com/lrod8/Qlutch/blob/main/assets/demo.png?raw=true)# Usage Notes
- Caching support for Update and Delete mutations is not yet implemented.# Installation
- User creates application and installs qlutch dependency via [npm](https://www.npmjs.com/package/qlutch) (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](https://github.com/lrod8/Qlutch/blob/main/assets/expressStatic.png?raw=true)
- For the dashboard visualizer, add a dashboard endpoint with a path to the qlutch dist index file:
![alt text](https://github.com/lrod8/Qlutch/blob/main/assets/dashboard.png?raw=true)
- 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](https://github.com/lrod8/Qlutch/blob/main/assets/endPoints.png?raw=true)
- Fetch requests on frontend will need to be made to /qlutch endpoint# Authors
- [@Michael-Weckop](https://github.com/Michael-Weckop)
- [@lrod8](https://github.com/lrod8)
- [@alroro](https://github.com/alroro)
- [@Reneeto](https://github.com/Reneeto)
# Acknowledgements
- [Charlie Charboneau](https://github.com/CharlieCharboneau)
- [Annie Blazejack](https://github.com/annieblazejack)
- [Matt Severyn](https://github.com/mtseveryn)
- [Erika Collins Reynolds](https://github.com/erikacollinsreynolds)
- [Sam Arnold](https://github.com/sam-a723)