{"id":16506336,"url":"https://github.com/oslabs-beta/rediqless","last_synced_at":"2025-03-16T18:32:30.789Z","repository":{"id":45720215,"uuid":"392867276","full_name":"oslabs-beta/rediQLess","owner":"oslabs-beta","description":"An optimization middleware that leverages the best features of GraphQL and Redis.","archived":false,"fork":false,"pushed_at":"2022-07-20T03:53:05.000Z","size":1903,"stargazers_count":78,"open_issues_count":2,"forks_count":13,"subscribers_count":4,"default_branch":"npm_rediqless","last_synced_at":"2025-03-16T04:41:23.024Z","etag":null,"topics":["cypress","graphql","jest","react","redis","tailwind-css","typescript"],"latest_commit_sha":null,"homepage":"https://www.rediqless.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oslabs-beta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-05T01:23:57.000Z","updated_at":"2025-02-11T01:16:38.000Z","dependencies_parsed_at":"2022-09-03T01:51:24.321Z","dependency_job_id":null,"html_url":"https://github.com/oslabs-beta/rediQLess","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2FrediQLess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2FrediQLess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2FrediQLess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2FrediQLess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oslabs-beta","download_url":"https://codeload.github.com/oslabs-beta/rediQLess/tar.gz/refs/heads/npm_rediqless","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910676,"owners_count":20367546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypress","graphql","jest","react","redis","tailwind-css","typescript"],"created_at":"2024-10-11T15:19:04.091Z","updated_at":"2025-03-16T18:32:27.156Z","avatar_url":"https://github.com/oslabs-beta.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\r\n\u003cimg src=\"https://rediqless.s3.us-east-2.amazonaws.com/REDIQLESS-LOGO-CLEAN+(2).png\" width=\"250\" /\u003e\r\n\u003c/p\u003e\r\n\u003ch1 align =\"center\"\u003eRediQLess\u003c/h1\u003e\r\n\u003cp align=\"center\"\u003eOne part Redis, one part GraphQL, this is RediQLess - a caching tool for APIs.\u003c/p\u003e\r\n\u003cp align=\"center\"\u003e\r\n\u003ca target=\"_blank\" href=\"https://github.com/oslabs-beta/rediQLess//blob/main/LICENSE\"\u003e\u003cimg alt=\"GitHub license\" src=\"https://img.shields.io/github/license/oslabs-beta/rediQLess\"\u003e\u003c/a\u003e \r\n\u003ca href=\"https://www.npmjs.com/package/rediqless\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/rediqless\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://github.com/oslabs-beta/rediQLess/stargazers\"\u003e\u003cimg alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/oslabs-beta/rediQLess\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://github.com/oslabs-beta/rediQLess/issues\"\u003e\u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/oslabs-beta/rediQLess\"\u003e\u003c/a\u003e\r\n\u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/oslabs-beta/rediQLess\"\u003e\r\n\r\n\u003c/p\u003e\r\n\u003ch2\u003eTable of Contents\u003c/h2\u003e\r\n\r\n- [About](https://github.com/oslabs-beta/rediQLess/#About)\r\n- [Features](https://github.com/oslabs-beta/rediQLess/#Features)\r\n- [Getting Started](https://github.com/oslabs-beta/rediQLess/#Getting-Started])\r\n- [Example](https://github.com/oslabs-beta/rediQLess/#Example)\r\n- [Contributors](https://github.com/oslabs-beta/rediQLess/#Contributors)\r\n- [License](https://github.com/oslabs-beta/rediQLess/#License)\r\n\r\n\u003ch2 href=\"#About\"\u003eAbout\u003c/h2\u003e\r\n\r\nOne part Redis, one part GraphQL, this is RediQLess - a caching tool for APIs. Utilizing GraphQL’s efficient and elegant querying language and Redis’ lightweight caching, we've leveraged these two features to generate a cache of API results. Built for developers, by developers, to facilitate lightweight and performant applications.\r\n\r\nLeveraging GraphQL’s declarative query language and strongly typed API with Redis’ inimitable caching mechanism, RediQLess caches unique calls to third-party APIs for ultimate comportability and maximum reusability. RediQLess’ cache functions as a replacement for the API, which can be memory-intensive on the client and server side.\r\n\r\nAn optimization middleware that leverages the best features of GraphQL and Redis to give developers the most lightweight database possible, with runtime speeds that average to around eighty to ninety percent faster than standard calls to an API. All while avoiding an overabundance of calls to third-party APIs. More specific, more efficient, absolutely RediQLess.\r\n\r\n## How It Works\r\n\r\nRediQLess as a middleware is powered by two class objects, RediQL and RediCache. RediQL is a dynamic query caching mechanism which leverages the RediCache Class Object to communicate with Redis on your local Redis port to initialize Redis functionaly. The RediCache Class Object uses incoming queries as a map to navigate Redis' key-value store; destructuring the queries into a series of constant time-readable key-value pairs with references to connected nodes. If RediCache finds that incoming query information is stored within Redis, RediCache is able to return that requested data in sub-15ms time. If RediCache does not find the incoming query within the Redis Store, the query is sent back through RediQL to grab the information in the requested API schema via GraphQL. As the data returns to the client, it is simultaneously sent back to RediCache to store that data for future use.\r\n\r\n## Getting Started\r\n\r\n### 1. Installing and Connecting to a Redis Server\r\n\r\nThis package is meant to work in conjunction with redis. To install redis:\r\n\r\n- Mac-HomeBrew:\r\n\r\n  - At the terminal, `brew install redis`\r\n  - Start redis server with `redis-server`\r\n\r\n- Linux or Window:\r\n  - Download appropriate version of Redis from [redis.io/download](redis.io/download)\r\n  - Once installation is completed, start redis server with `redis-server`\r\n\r\nOnce Redis is installed, your server should reflect the below:\r\n\r\n- Note: The default port is `6379`\r\n\r\n```javascript\r\nconst redisClient = redis.createClient({\r\n  host: \"localhost\",\r\n  port: 6379,\r\n});\r\n```\r\n\r\n### 2. Installing RediQLess\r\n\r\nInstall RediQLess as an npm module and save it to your package.json as a dependency.\r\n\r\n`npm install rediqless --save-dev`\r\n\r\n### 3. Setting up your Server Port\r\n\r\nCreate a .env file, to create your PORT which will be leveraged by the RediQLess middleware\r\n\r\nYour Server file should reflect the below:\r\n\r\n```javascript\r\nconst dotenv = require(\"dotenv\").config();\r\nconst PORT = process.env.PORT;\r\n```\r\n\r\n## 4. Require GraphQL and Schema\r\n\r\nThe Express GraphQL Server is leveraged by RediQLess\r\n\r\n```javascript\r\nconst graphqlHTTP = require(\"express-graphql\");\r\nconst schema = require(\"./schema/schema\");\r\n```\r\n\r\n## 5. Implementing RediQLess for Queries and Caching\r\n\r\n```javascript\r\nconst { RediQLess } = require(\"rediqless\");\r\nconst RediQL = new RediQLess(redisClient);\r\nconst RediQLQuery = RediQL.query;\r\nconst RediQLClear = RediQL.clearCache;\r\n```\r\n\r\n## How to Use RediQLess\r\n\r\nBelow is a typical Express Server set up utilizing RediQLess:\r\n\r\n```javascript\r\n// Require in Express and app\r\nconst express = require('express');\r\nconst app = express();\r\n\r\n// Require/Config dotenv for access to your PORT\r\nconst dotenv = require('dotenv').config();\r\nconst PORT = process.env.PORT;\r\n\r\n// Require GraphQL and Schema\r\nconst graphql  = require('express-graphql');\r\nconst schema = require('./schema/schema');\r\n\r\n// Initialize up Redis Client\r\nconst redis = require('redis');\r\nconst redisClient = redis.createClient({\r\n  host: 'localhost',\r\n  port: 6379,\r\n});\r\n\r\n// Require in RediQLess middleware\r\nconst { RediQLess } = require('rediqless');\r\n// Pass redisClient into RediqLess Constructor\r\nconst RediQL = new RediQLess(redisClient);\r\n// Implement RediQLess' query capability\r\nconst RediQLQuery = RediQL.query;\r\n// Implement RediqLess' cache clearing capability\r\nconst RediQLClear = RediQL.clearCache;\r\n\r\n// Leverage RediQLess Queries\r\n// ** Assign queries on the front-end to 'req.body.data.query'\r\napp.use('/rediql', RediQLQuery, (req, res) =\u003e {\r\n  return res.status(202).send(res.locals.query))\r\n});\r\n\r\n// Leverage RediQLess Cache Clearing\r\napp.use('/clearcache', RediQLClear, (req, res) =\u003e {\r\n  return res.status(202).send('Cache Cleared')\r\n});\r\n\r\n// RediQLess query will forward request to this Middleware if information is not yet cached\r\napp.use('/graphql', graphqlHTTP.graphqlHTTP({ schema, graphiql: true }));\r\n```\r\n\r\n\u003ch2 href=\"#Contributors\"\u003eContributors\u003c/h2\u003e\r\n\r\nRediQLess is an open-source community project on Github. While the project is maintained by a small group of dedicated engineers (below), we are grateful to the community for bug fixes, feature development and other contributions.\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd valign=\"top\"\u003e \u003cimg src=\"https://rediqless.s3.us-east-2.amazonaws.com/profile.jpg\" width=\"250\"/\u003e\u003c/td\u003e\r\n    \u003ctd valign=\"top\"\u003e \u003cimg src=\"https://rediqless.s3.us-east-2.amazonaws.com/1629337049016.jpeg\" width=\"250\"/\u003e\u003c/td\u003e\r\n    \u003ctd valign=\"top\"\u003e \u003cimg src=\"https://rediqless.s3.us-east-2.amazonaws.com/Screen+Shot+2021-10-21+at+10.30.15+PM.png\" width=\"250\"/\u003e\u003c/td\u003e\r\n    \u003ctd valign=\"top\"\u003e \u003cimg src=\"https://media-exp1.licdn.com/dms/image/C4D03AQEOE2BopNqOmg/profile-displayphoto-shrink_800_800/0/1529432272197?e=1635379200\u0026v=beta\u0026t=CcNs7vSOXoStA_orsa2VazEHGbAwNPJMWmvxvYmQkok\" width=\"250\"/\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n  \u003ctr\u003e\r\n      \u003ctd valign=\"top\"\u003e\u003ch2 align=\"center\"\u003eEric Saldivar\u003c/h2\u003e\u003c/td\u003e\r\n      \u003ctd valign=\"top\"\u003e\u003ch2 align=\"center\"\u003eCharles Malave\u003c/h2\u003e\u003c/td\u003e\r\n      \u003ctd valign=\"top\"\u003e\u003ch2 align=\"center\"\u003eTravis Woolston\u003c/h2\u003e\u003c/td\u003e\r\n      \u003ctd valign=\"top\"\u003e\u003ch2 align=\"center\"\u003eIan Judd\u003c/h2\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n   \u003ctr\u003e\r\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/esaldivar\" target=\"_blank\" align=\"center\"\u003e \u003cimg src=\"https://rediqless.s3.us-east-2.amazonaws.com/ghicon.png\" alt=\"ericGitHub\" width=\"50\" height=\"50\"/\u003e\u003c/a\u003e\u003c/td\u003e\r\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/cmalave13\" target=\"_blank\" align=\"center\"\u003e \u003cimg src=\"https://rediqless.s3.us-east-2.amazonaws.com/ghicon.png\" alt=\"charlieGitHub\" width=\"50\" height=\"50\"/\u003e\u003c/a\u003e\u003c/td\u003e\r\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/TravisWoolston\" target=\"_blank\" align=\"center\"\u003e \u003cimg src=\"https://rediqless.s3.us-east-2.amazonaws.com/ghicon.png\" alt=\"travisGitHub\" width=\"50\" height=\"50\"/\u003e\u003c/a\u003e\u003c/td\u003e\r\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/ikjudd\" target=\"_blank\" align=\"center\"\u003e \u003cimg src=\"https://rediqless.s3.us-east-2.amazonaws.com/ghicon.png\" alt=\"IanGitHub\" width=\"50\" height=\"50\"/\u003e\u003c/a\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\nWe welcome contributions to RediQLess, but we also would love to see a thriving third-party ecosystem. If you are interest in creating an open-source project that builds on top of RediQLess, please don't hesitate to reach out, and we'd be happy to provide feedback and support.\r\n\r\n\u003ch2 href=\"#License\"\u003eLicense\u003c/h2\u003e\r\n\r\nThis product is licensed under the MIT License - see the LICENSE.md file for details.\r\n\r\nThis is an open source product.\r\n\r\nThis product is accelerated by [OS Labs](https://opensourcelabs.io/).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foslabs-beta%2Frediqless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foslabs-beta%2Frediqless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foslabs-beta%2Frediqless/lists"}