{"name":"@envelop/parser-cache","version":"0.1.0","sideEffects":false,"peerDependencies":{"graphql":"^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"},"description":"This plugins adds simple LRU caching to your `parse`, to execurion improve performance by caching the parsed result.","_id":"@envelop/parser-cache@0.1.0","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-DF5lMNJHuFMrQq2QptkkBCX0C4QjtARu/CV/s+NueqQUkkp/vEwAEWa75QCeLQON+3jGXpMksc1rHCkfzqop9g==","shasum":"4168dc8f6714fa84ef6c9cdfa621c8e9330292d3","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-0.1.0.tgz","fileCount":7,"unpackedSize":9216,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW3G5CRA9TVsSAnZWagAArVgP/1EeKaUn2LbaXW07E6Cb\nBecq5B6r2PJRC1Dh4rdvCALGCv08BCnxI+NcCiv9NIBndvP+y8Ob/pMv42RH\nXc34yJ29Uy/AJsYFS8iHhJ6bC9mguAUwYLuap8VqRzq8elo3g50NL3bB3zT/\nAcNn380LQ5ENfq9kLnFE5e9Vj5biy/XkU0A7bxmUaUDok3NYt02d4t3ZMKZa\nrsAFiw/Xq9HKLKZQaKupkvPStRh81UaJKefbNXpU/TU2LVaHDjkhW9X1Tgr4\nkK1kddKU2yo3lTXrVDSq1RanO57UYYqwN1TVQywnJPVIr0PpDv00S1bd1mXA\nVJqOlv3IV7pkysWjKJ6czB/iZd4ggxDKIwiztLIwlyLqMhztgUUC9LBPoIvT\nBucvIwP1iKs+EpsWSL/lzSHaJj0wP5wDn977OMsaTHcYVYvW+gIfKoVjgolI\n45kEZgpz3XOtj0OHLlwMHNERVK7BeWRGyco1JPre5/B3aSLwilcleFZB4A4A\nZPsF7h6rbMA/WKQI3ws6xmlV02K8iCjfFBY5JUS27QKPfwhjxVY7pRR38z68\n6/LZx7v3TifOQXV57mWwvFn57MpPVuUgQ73OdBCKrw4m3gcCTP4yz4VRkYsP\nkRGQBqsZprhyXKdNTMunN4FdN3anYlMFRQbT1+624JdsJLyCpvVxYrLFXgHz\nwUwg\r\n=U+86\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbGnks9z/rLc4XFZOHMTXdDnFKBpw8plMtNYGaebQxsAIhAM9C6HeICgapZYWmkqI82OcEXBVrycOn2ZyW51mutBYK"}],"size":2027,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-0.1.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.1.0_1616605625337_0.34245933927848604"},"_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":1616605625459,"_cnpm_publish_time":1616605625459,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}