{"name":"@envelop/parser-cache","version":"0.0.0","sideEffects":false,"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"dependencies":{"tiny-lru":"7.0.6"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"_id":"@envelop/parser-cache@0.0.0","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-mFwROJGaaCBJjTi4rrhu7dR5KK2mWgcAHNqF+/+7TUkluEGd4BPeZg1HeoQIOlWieEYczqg2BGn5XlidBYDzcw==","shasum":"fb012460cf11236ef3cf6bc66daa222d2f562041","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-0.0.0.tgz","fileCount":6,"unpackedSize":8575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgP7vOCRA9TVsSAnZWagAAcEoQAICd/tov/SZuoS/tSpUQ\nSJA/2zhFwE38O4CR5HrSQapxhb3v6nkqw1/rIIadqxx6+7IRzl94cmoLHfhO\nZW05iMJ7uJnaYMXYZQKKQDqR0kOQfFTzGybyswtLq4piZlUV/9Jh9lpVfB0U\neQCF7rTCuAUJq3X8eQ7rE1YzzEAUj76RgL/29kQKDC8CJbzIwAtpcZlBHlwc\nqJE3dfTfp0Y2BpsXP8kGgwCdAcwT+rQKP5mRxsPRIb18gWe+w/N1hfBubcJ2\nixpUfzZfgw4OBt+cKt2QohJ+CxcXxJ2GwZ5APHRddS58KkwJgkJhe+bAFuKL\ngLzm+S4VsxZ8Sb/JXfVY7AhAEV9X+maaIdwAbZuhf/ldh/iZ2O/05lSrCXnd\n2/FDcSSpKqNQs4hmRHg+LlRv08Brv3/AzpXzSExOmhmi8cx2zW3sYi2s5f7f\nPM7at9fb1ZOPH98qedqqZweA9iGgQTHmcC8+CmYIqfJb4S9+O4p10nOHUbfX\ntacDsOLYKtDFOsxCdq+1qk3hdW6JQ64j+mYy/FBcVOYotMZPBDDaejNZUyz7\nPZEjsOAIVP2iYr7xdLvwO7WC1TCpgBDDZtc7yelLySERjN5tzpwaw3SF3W6/\ngT4EXW2PayF6tt2yHFviVb03RpEg34L5vStgEIZ2ka7zUtJvZrBq1zJVEw6V\nXneQ\r\n=5tqH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB8Js9cMHMd0EaggCyP7dXitQCZBRc1zt9Ugyaisw/RIAiEAhxrTGcowHa5zezD8J7w+fbUHFtFgC9qlTwNZEorBXss="}],"size":1697,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-0.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_0.0.0_1614789581744_0.9649168499620602"},"_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":1614789581882,"_cnpm_publish_time":1614789581882,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}