{"name":"@envelop/parser-cache","version":"0.0.1","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.1","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-CVb6rHdEC78z+LVlKKrTXFdodD4iSwjWK8D1OVBiJ/Lt5LI2xuxH94jinW5oMHsKHyp8+QGSjeBVex2quFacbw==","shasum":"fd575dd26188eb3a8c2cfe41c1affa474d4213a2","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-0.0.1.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\nwsFcBAEBCAAQBQJgRJUmCRA9TVsSAnZWagAA3H8P/jITam3nXENKj2BgoBBF\n6blg6Ti0h7U76am56VjQuaemctWW3s7f8ZwLPnLGw1gtZRcnlZ1a6Cp6yaez\nesZpFLkMtlCvk2aysBPfjtKim3HKXWPI0WkBIxHqyCQjz4/LxdigxyQk6Vfc\niOePKh617cgKt/Vwa9Hq2Oue9TR4hl58h1nPIz9wFJDEBX48JoSIpFRKUi+6\nNVUMfhm68pTfHAw/CkOzUwll8Ga3crQvc4GsrkAUzQcsTPNRGe0rBLFRVcae\nShvB4ZZLl/Lj42/ufn6MIQC2qxy6tIKraUsDixCRRW85gcB0oaec8GYHVLLW\nBNXjLbA7EZK8Kc3EABf5DAh5xyiJJpH+qhV95nzvyCzesEot9pCVb3jDj9fG\nkQh1XEEAJsgGCD97+xeetK358FrFPAn80Gip/3t0J7H2E0ZzB1TviZri+gL3\nDfknkdHzakUKXTlBT06DbJfHQVE2uzpmodd4ahTuw6Wri8v6RuXtnkZr8FJ0\nquRPzHgo94U/mAXNwLh3lmEd15T9XWoNUXSxzelw8Th5u43F79NSISM69NVC\nSsF61orU8/V/7TUExn14w16xomkTr4qOya9o0kD1OEvK3QR6wKiPOK5/9iWm\noH5Iy7WKJQ2BrRDvKN8zDHB5uk2jeagkr2keVDDVGCPjO3vh1PdDR/E8y67z\nCGai\r\n=EO5B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC6XWyWKBxbn/yv7q1QR8FUoIpjgfKEbWf+HNr1s54eiAiEAtWBc1NbTFcSHgcz1JxhCo60gcP9u4u0zXYfot3f7Tho="}],"size":1698,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-0.0.1.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.1_1615107366526_0.3368934370537482"},"_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":1615107366654,"_cnpm_publish_time":1615107366654,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}