{"name":"@envelop/parser-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/parser-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 `parse`, to improve performance by caching the parsed result.","bugs":{"url":"https://github.com/dotansimha/envelop/issues"},"homepage":"https://github.com/dotansimha/envelop#readme","_id":"@envelop/parser-cache@1.0.0","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-mdMf4wJiMWRRpqUOQkaaa5hP2FUWS80UMjDUJ/Ga2dIXUJZVlPapoWjIRd9JH14wg8n0/jpHs27YR7ETKV259g==","shasum":"1dfdf0ff916f8b90139389b588fbc021b57b956d","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-1.0.0.tgz","fileCount":7,"unpackedSize":10016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+XHUCRA9TVsSAnZWagAASxAQAIbYINxK+ay0b/K4g9Yv\nmU0OFNWwpyRZ4clI9kyla7wnyoRnIBrX4sH9+0QuIA/6AeFKWELBHlDRea5r\n3yd40oyoWg/OGc+w15nDO6I4LGTRYNHzm9BHw72z6ZuZG5FMgxwYj3998LT5\n9pLVSlJVpb8xMkZYuPKx9eyjmfC2nKGNbRucHn6OwvSvn7b88z7k1GhdGZ6X\nGCQv4k9QCbkuzZ/vSvl9qPjCBTbPMH+WbJXYdkJ4Pwtn9yonux9Xby2pEfKA\naZDSJ52gzYkK3uoqrCM+KhNiQ6SqEFb+HoF37aqpd260MWnK6id3MpKgWBMy\nnfxcZgEmkIs5sn4pxPue3s0U34i1tYQMcd034zZN+IBUfr0JeKZ3GEMVDF0V\nCaI/rxc7HiU77v0rSEhSeZ84yqwhVJRIPrB/b5AY+DRK0j4Xu2ajsbSL8H1B\nd+cXcqdCqMxQfBXZraBmVUFyq7SEwbkZHVzO58Vfqz9qdBj1y5UoqXHlraN2\no43NdlVkZ2+NvtaLcJr6VQjkEOOBBPIN1G2pdwPoghbW0CWrELkg4ToAIh+A\n9LWXj+VJ5oqp2hUBQ695M310eEIn8TjVh6deaw6q5GUjBHDiBOc3FjpJ22mh\nNzK9DYMR7N61IQ5Nw0Jwf7rTeKxEV5mG0tTzRfH4F3wblk0m3hAzFCm6Irm4\nuKCy\r\n=rEVR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNWZUuOuAn+fR2Aov6hAChSbEm2KZPmLujBE2v/jBsagIhAL1BWzWTy9//sJJxV3N4H0q9XfPGCBbJk++RjWz10r9M"}],"size":2193,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-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/parser-cache_1.0.0_1626960340513_0.2590701718861812"},"_hasShrinkwrap":false,"readme":"## `@envelop/parser-cache`\n\nThis plugins adds simple LRU caching to your `parse`, to improve performance by caching the parsed\nresult.\n\nThis plugins improves performance of parsing by ~60% (based on benchmarks).\n\n## Getting Started\n\n```\nyarn add @envelop/parser-cache\n```\n\n## Usage Example\n\n```ts\nimport { execute, parse, specifiedRules, subscribe, validate } from 'graphql'\nimport { envelop, useEngine } from '@envelop/core'\nimport { useParserCache } from '@envelop/parser-cache'\n\nconst getEnveloped = envelop({\n  plugins: [\n    useEngine({ parse, validate, specifiedRules, execute, subscribe }),\n    // ... other plugins ...\n    useParserCache({\n      // options goes here\n    })\n  ]\n})\n```\n\n### API Reference\n\n#### `documentCache`\n\nSet this to pass in a cache instance for caching documents. By default a new LRU cache is created\nusing default `max` and `ttl`.\n\n#### `errorCache`\n\nSet this to pass in a cache instance for caching errors. By default a new LRU cache is created using\ndefault `max` and `ttl`.\n","publish_time":1626960340677,"_cnpm_publish_time":1626960340677,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}