{"name":"@envelop/validation-cache","version":"1.0.0","sideEffects":false,"peerDependencies":{"graphql":"^14.0.0 || ^15.0.0"},"dependencies":{"tiny-lru":"7.0.6"},"repository":{"type":"git","url":"git+https://github.com/dotansimha/envelop.git","directory":"packages/plugins/validation-cache"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.js","module":"index.mjs","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"exports":{".":{"require":"./index.js","import":"./index.mjs"},"./*":{"require":"./*.js","import":"./*.mjs"}},"description":"This plugins adds simple LRU caching to your `validate`, to improve performance by caching the validation result.","bugs":{"url":"https://github.com/dotansimha/envelop/issues"},"homepage":"https://github.com/dotansimha/envelop#readme","_id":"@envelop/validation-cache@1.0.0","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-HI4in/DlqSsZ6/hCAG9TTqvigTgd+5TGdz3JTGQr471vMW/Biw1a1C90VQO1XYMScxjranQfbBXu+ktA4kN6Kw==","shasum":"0e16553e9dd6047a024c9c75520f57217d10c777","tarball":"http://registry-npm.ywwl.com/@envelop/validation-cache/download/@envelop/validation-cache-1.0.0.tgz","fileCount":7,"unpackedSize":7872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+XHZCRA9TVsSAnZWagAAqFEQAI9U/DaXkyMIyT67jX8s\nmksE5tUu2u2dZhY7pPQLXndnMnyeQ/wNJEuN6wxcRFU7KSlwQMEDp8eUqRmk\ndgslgCBGIIFOsFlGBn2oKLI1wKN4mb5LqwyoBW4eUmmARDpn4UM91GlshIwq\nOmhY2CrXmAHaPtjETzVxLLWPhAkLQVlB8UQlqbvh1i3gl1U+vHOH4MWtrLzU\nGmchBaRwLlrf4XUjxq4j3kNAT07KYPk3c96hpT0KqcfaxD85jV5HFlgQET2C\n+TN1yRGP8qWIExYzh4bU2QCU4S6SaDmvI6PVfr2baEceAPVp10pFZs8ljOIY\nOghnI1g+ohlXrrqLPwMpBt5lARkbmiz63Jn4bog8ZGUTxy+04taxUXkVrAgd\nhtECw9v9skW8gbuZ6Uc6EkkjfWJog8irQjfG0W8VjXrZjG4vrZsZzqA+Afa5\nFNE6f5rofNO03OIc2mCGnr12W29qBxnz40kNWkiqg6+pdDUul+4ZnVYCINOg\nPSEkkBxOwO8nftNDTBVkbwyctwJdO6s0bTLrm+88fK+v53zSVyhvC5uDV+jV\nny5cKlGNZweV6TwRJVXegPkFxXKqG0FiB9DkF1R0+W9rDjHoFWJfkjKICb0H\nvl+3pPWhdI1wg6bjBxu575bUmPsebwd19EWvc/LXJLVReEP/c/yPdEPO5UZa\njIwv\r\n=Xt/b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE4AuhlPJ3U8+53m5I8weU6LJvuGRUM0asniwSJNURTTAiEAimK8EXTuBuTRyXTTpsg0RyFlaZct+/H7wSBAaDPuVxk="}],"size":2036,"noattachment":false,"key":"/@envelop/validation-cache/-/@envelop/validation-cache-1.0.0.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_1.0.0_1626960345723_0.38898587641397997"},"_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":1626960345840,"_cnpm_publish_time":1626960345840,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}