{"name":"@envelop/validation-cache","version":"5.0.3","sideEffects":false,"peerDependencies":{"@envelop/core":"^3.0.3","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"lru-cache":"^6.0.0","tslib":"^2.4.0"},"repository":{"type":"git","url":"git+https://github.com/n1ru4l/envelop.git","directory":"packages/plugins/validation-cache"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./*":{"require":{"types":"./typings/*.d.cts","default":"./cjs/*.js"},"import":{"types":"./typings/*.d.ts","default":"./esm/*.js"},"default":{"types":"./typings/*.d.ts","default":"./esm/*.js"}},"./package.json":"./package.json"},"gitHead":"a11a876863dd760b9afebcecc41d9002f3a943c6","description":"This plugins adds simple LRU caching to your `validate`, to improve performance by caching the validation result.","bugs":{"url":"https://github.com/n1ru4l/envelop/issues"},"homepage":"https://github.com/n1ru4l/envelop#readme","_id":"@envelop/validation-cache@5.0.3","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-zJcP8CFCdeUTkIymbBnuRgp3+G/YCubl7Pi+WoM0W2LAsJl7yxvqoaHS5aPbpNJunqUomsnRwBtkcK966EzjsQ==","shasum":"0151a42e80fb9667c418a8c94a7b888b7f6a0b4b","tarball":"http://registry-npm.ywwl.com/@envelop/validation-cache/download/@envelop/validation-cache-5.0.3.tgz","fileCount":7,"unpackedSize":6502,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+f7n0q/ScNi66o2yCtYMNuNXkoaWSj2dkVJgm342DcwIhAMP8iWZgpTKaoeALgMh6GRx8kjJ6q6f3h3l3bEXDr7hc"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWwasACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6Hw//QTWEWjc8iJ7M+NWr953jgbPpF3JOHnAE6n4luvPsJvffzzmr\r\noPhOiMc3qbb4df4Bk7xLWCEa5i2dn0/rvLpJk9K1bfVU46HzYG4Yzy7nLJUC\r\nzMEQiWQ92+DghQLGcg7zyTpRLl8LIXSzee5HXkUnAdC9+gN22AoP6N1q4zub\r\nf5njWI1D0a3xiSgcmLrZ3tz0H25cuXlJIiL+r/tviB88LCndjrm5Kbr/8JcN\r\nUIwKaF8MmU4+yKWBFid8RMxeqO10FeO4zfL4YM9CAY7qwqKSjvNve3o2hsYG\r\nBb81ym+1IrWGAh8WtdvsPgJrMr+pwvafSslOuYfsjbhg3893FLvN+OZWnP6o\r\n+lWpgQKJTU1r6tplcD0Fy+xpuJgfKkZBMQOX/HykPr/unwY8roBPHkcntVKw\r\nFenwkL1CQwxUaot49U8Kn8lEvV9Kr9yPh55s/tHbfkVY4ya8vCJEB/uANRqj\r\nNU4YUiDEJF0Ka7+scw3WLkLfTkIrvkXAs1E45ow2hnMAh3Edr5qVL2Q7vlvp\r\nGPqnDJPEr1PTh75HzUEzCbnP9UTRnu85sMIOmg5KTEdefv5G30KcKSr0riD8\r\n+x6mzs/qbf9IKIDt9TYveZz6mMfYNcpn3mEyTw+9gbLhOotxJFn7xGRBwUOw\r\nzPP67+aFotI5zuW82xu3mtp4oom0wlnHFyA=\r\n=xcf2\r\n-----END PGP SIGNATURE-----\r\n","size":1909,"noattachment":false,"key":"/@envelop/validation-cache/-/@envelop/validation-cache-5.0.3.tgz"},"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/validation-cache_5.0.3_1666909868497_0.7998638000665437"},"_hasShrinkwrap":false,"readme":"## `@envelop/validation-cache`\n\nThis plugins adds simple LRU caching to your `validate`, to improve performance by caching the\nvalidation result.\n\nThis plugins improves performance of validating by ~50% (based on benchmarks).\n\n## Getting Started\n\n```\nyarn add @envelop/validation-cache\n```\n\n## Usage Example\n\n```ts\nimport { execute, parse, specifiedRules, subscribe, validate } from 'graphql'\nimport { envelop, useEngine } from '@envelop/core'\nimport { useValidationCache } from '@envelop/validation-cache'\n\nconst getEnveloped = envelop({\n  plugins: [\n    useEngine({ parse, validate, specifiedRules, execute, subscribe }),\n    // ... other plugins ...\n    useValidationCache({\n      // options goes here\n    })\n  ]\n})\n```\n\n### API Reference\n\n#### `cache`\n\nSet this to pass in a cache instance. By default a new LRU cache is created using default `max` and\n`ttl`.\n","publish_time":1666909868657,"_cnpm_publish_time":1666909868657,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}