@quell/server
Version:
Quell is an open-source NPM package providing a light-weight caching layer implementation and cache invalidation for GraphQL responses on both the client- and server-side. Use Quell to prevent redundant client-side API requests and to minimize costly serv
2 lines • 1.11 kB
TypeScript
export declare const configTemplate = "import { QuellCache } from '@quell/server';\nimport { schema } from './src/server/schema/example-schema.ts'; // Your GraphQL schema\nimport dotenv from 'dotenv';\n\n// Load environment variables\ndotenv.config();\n\n// Cost parameters configuration\nconst costParameters = {\n maxCost: Number(process.env.MAX_COST) || 5000,\n mutationCost: Number(process.env.MUTATION_COST) || 5,\n objectCost: Number(process.env.OBJECT_COST) || 2,\n scalarCost: Number(process.env.SCALAR_COST) || 1,\n depthCostFactor: Number(process.env.DEPTH_COST_FACTOR) || 1.5,\n maxDepth: Number(process.env.MAX_DEPTH) || 10,\n ipRate: Number(process.env.IP_RATE) || 3,\n};\n\n// Initialize Quell cache with universal schema support\nexport const quellCache = new QuellCache({\n schema,\n cacheExpiration: Number(process.env.CACHE_EXPIRATION || 1209600),\n redisPort: Number(process.env.REDIS_PORT || 6379),\n redisHost: process.env.REDIS_HOST || \"127.0.0.1\",\n redisPassword: process.env.REDIS_PASSWORD || \"\",\n costParameters,\n});\n";
//# sourceMappingURL=config.template.d.ts.map