{"_id":"@praha/envelop-request-cache","_rev":"7-4571fd05d8228ba501afd34a89818a32","name":"@praha/envelop-request-cache","dist-tags":{"alpha":"1.0.0-alpha.0","latest":"1.2.3"},"versions":{"1.0.0-alpha.0":{"name":"@praha/envelop-request-cache","version":"1.0.0-alpha.0","keywords":["javascript","typescript","graphql","envelop","cache"],"author":{"name":"PrAha, Inc."},"license":"MIT","_id":"@praha/envelop-request-cache@1.0.0-alpha.0","maintainers":[{"name":"karibash","email":"y.karibayashi@gmail.com"},{"name":"zack-msyc86","email":"okazaki@praha-inc.com"}],"homepage":"https://github.com/praha-inc/envelop/blob/main/packages/envelop-request-cache/README.md","bugs":{"url":"https://github.com/praha-inc/envelop/issues"},"dist":{"shasum":"a5f16804c481104d3fea55bc23f1837e9ed9c0de","tarball":"https://registry.npmjs.org/@praha/envelop-request-cache/-/envelop-request-cache-1.0.0-alpha.0.tgz","fileCount":7,"integrity":"sha512-MdDiQPnDapCWG3BlwLktnvNJnedma3oW30soVY4Zb7JBz7CTdumMjsuXinhxsqV/zUyQtW65FrizJO/VTdBBjA==","signatures":[{"sig":"MEYCIQCfAUpcTiy2gJ+BeqnTt39hWCdlC1et9pDwrwRoRX+ofAIhAPMosyypcoAFbv//G3nO85187syOdhu1aLj9+wGzZlHk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10927},"main":"./dist/cjs/index.cjs","type":"module","_from":"file:praha-envelop-request-cache-1.0.0-alpha.0.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","exports":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.cjs"}},"scripts":{"test":"vitest run","build":"rslib build","lint:code":"eslint .","lint:type":"tsc --noEmit","test:watch":"vitest watch"},"_npmUser":{"name":"karibash","email":"y.karibayashi@gmail.com"},"_resolved":"/private/var/folders/14/_50qq_7n1svcgqfy9pqlq2r80000gp/T/0f5bea8341c47ad99b6b1c06e26a1aa8/praha-envelop-request-cache-1.0.0-alpha.0.tgz","_integrity":"sha512-MdDiQPnDapCWG3BlwLktnvNJnedma3oW30soVY4Zb7JBz7CTdumMjsuXinhxsqV/zUyQtW65FrizJO/VTdBBjA==","repository":{"url":"git+https://github.com/praha-inc/envelop.git","type":"git","directory":"packages/envelop-request-cache"},"_npmVersion":"10.9.2","description":"This plugin caches arbitrary values within the request scope to optimize execution flow","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"9.22.0","vitest":"3.0.9","typescript":"5.8.2","@rslib/core":"0.5.4","@types/node":"22.13.10","@envelop/core":"5.2.3","@envelop/testing":"8.1.3","@graphql-tools/schema":"10.0.23"},"peerDependencies":{"@envelop/core":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/envelop-request-cache_1.0.0-alpha.0_1742886470392_0.2083674284116872","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@praha/envelop-request-cache","version":"1.0.0","keywords":["javascript","typescript","graphql","envelop","cache"],"author":{"name":"PrAha, Inc."},"license":"MIT","_id":"@praha/envelop-request-cache@1.0.0","maintainers":[{"name":"karibash","email":"y.karibayashi@gmail.com"},{"name":"zack-msyc86","email":"okazaki@praha-inc.com"}],"homepage":"https://github.com/praha-inc/envelop-plugins/blob/main/packages/request-cache/README.md","bugs":{"url":"https://github.com/praha-inc/envelop-plugins/issues"},"dist":{"shasum":"f3ca185e6277c95dea5f6c9d61706c45fd730e77","tarball":"https://registry.npmjs.org/@praha/envelop-request-cache/-/envelop-request-cache-1.0.0.tgz","fileCount":7,"integrity":"sha512-DcrJjsEVvoE0zDOxAsSmNYQR6LCKe12bFPixiT2o0i3Rn+axjKJD3Ec6RQ0nO22+ngO4dTTfuInIx7wXkfMNLg==","signatures":[{"sig":"MEUCIQCVG0xMFWma6LF4weo4btlNMlYULZdm+WtbQXXeC04wXgIgIicjYDGobg4jfcdNekWWAUs7N13wyMTu9qKnT9cZgCM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@praha%2fenvelop-request-cache@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":10976},"main":"./dist/cjs/index.cjs","type":"module","_from":"file:praha-envelop-request-cache-1.0.0.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","exports":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.cjs"}},"scripts":{"test":"vitest run","build":"rslib build","lint:code":"eslint .","lint:type":"tsc --noEmit","test:watch":"vitest watch"},"_npmUser":{"name":"karibash","email":"y.karibayashi@gmail.com"},"_resolved":"/tmp/36c6678d773de9029585000ffce06ace/praha-envelop-request-cache-1.0.0.tgz","_integrity":"sha512-DcrJjsEVvoE0zDOxAsSmNYQR6LCKe12bFPixiT2o0i3Rn+axjKJD3Ec6RQ0nO22+ngO4dTTfuInIx7wXkfMNLg==","repository":{"url":"git+https://github.com/praha-inc/envelop-plugins.git","type":"git","directory":"packages/request-cache"},"_npmVersion":"10.8.2","description":"This plugin caches arbitrary values within the request scope to optimize execution flow","directories":{},"_nodeVersion":"20.19.0","publishConfig":{"provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.22.0","vitest":"3.0.9","typescript":"5.8.2","@rslib/core":"0.5.4","@types/node":"22.13.10","@envelop/core":"5.2.3","@envelop/testing":"8.1.3","@graphql-tools/schema":"10.0.23"},"peerDependencies":{"@envelop/core":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/envelop-request-cache_1.0.0_1742891628200_0.820871941194818","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@praha/envelop-request-cache","version":"1.1.0","keywords":["javascript","typescript","graphql","envelop","cache"],"author":{"name":"PrAha, Inc."},"license":"MIT","_id":"@praha/envelop-request-cache@1.1.0","maintainers":[{"name":"karibash","email":"y.karibayashi@gmail.com"},{"name":"zack-msyc86","email":"okazaki@praha-inc.com"}],"homepage":"https://github.com/praha-inc/envelop-plugins/blob/main/packages/request-cache/README.md","bugs":{"url":"https://github.com/praha-inc/envelop-plugins/issues"},"dist":{"shasum":"93d314e9b3dd2805fe58debca67672501ce2a92c","tarball":"https://registry.npmjs.org/@praha/envelop-request-cache/-/envelop-request-cache-1.1.0.tgz","fileCount":7,"integrity":"sha512-jX9csFcqP26MXop4j0dQwtftnDlhvz6WO5ah1799SpfaR18Tri/JvfP7HJqSPXquGqs1lE1raurq83GQlykDBQ==","signatures":[{"sig":"MEQCIAovTHb7oUi/JXjUjrJZ3+pJRWqMAdnKY3Gcy4xwss0qAiBUpFx/tIj6g2m6DEEKXsRVo6QBAmcbO/cjy0I0K8UdYA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@praha%2fenvelop-request-cache@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11309},"main":"./dist/cjs/index.cjs","type":"module","_from":"file:praha-envelop-request-cache-1.1.0.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","exports":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.cjs"}},"scripts":{"test":"vitest run","build":"rslib build","lint:code":"eslint .","lint:type":"tsc --noEmit","test:watch":"vitest watch"},"_npmUser":{"name":"karibash","email":"y.karibayashi@gmail.com"},"_resolved":"/tmp/91c6b65d5d2c3d3f7b472b3d55327aa9/praha-envelop-request-cache-1.1.0.tgz","_integrity":"sha512-jX9csFcqP26MXop4j0dQwtftnDlhvz6WO5ah1799SpfaR18Tri/JvfP7HJqSPXquGqs1lE1raurq83GQlykDBQ==","repository":{"url":"git+https://github.com/praha-inc/envelop-plugins.git","type":"git","directory":"packages/request-cache"},"_npmVersion":"10.8.2","description":"This plugin caches arbitrary values within the request scope to optimize execution flow","directories":{},"_nodeVersion":"20.19.0","publishConfig":{"provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.23.0","vitest":"3.1.1","typescript":"5.8.2","@rslib/core":"0.6.1","@types/node":"22.14.0","@envelop/core":"5.2.3","@envelop/testing":"8.1.3","@graphql-tools/schema":"10.0.23"},"peerDependencies":{"@envelop/core":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/envelop-request-cache_1.1.0_1743691463219_0.11820058532185684","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@praha/envelop-request-cache","version":"1.2.0","keywords":["javascript","typescript","graphql","envelop","cache"],"author":{"name":"PrAha, Inc."},"license":"MIT","_id":"@praha/envelop-request-cache@1.2.0","maintainers":[{"name":"karibash","email":"y.karibayashi@gmail.com"},{"name":"zack-msyc86","email":"okazaki@praha-inc.com"}],"homepage":"https://github.com/praha-inc/envelop-plugins/blob/main/packages/request-cache/README.md","bugs":{"url":"https://github.com/praha-inc/envelop-plugins/issues"},"dist":{"shasum":"96154a5647847eb9de3bdd8ef67a1ddb97273714","tarball":"https://registry.npmjs.org/@praha/envelop-request-cache/-/envelop-request-cache-1.2.0.tgz","fileCount":7,"integrity":"sha512-aHhz2b2NVBVU3knqPiBFGm9K4z3BtkS31j7wf4Aaunf+E14DvTm0/tRS+5HINWsu+EbrrB9/PvXazpfCg1ggVg==","signatures":[{"sig":"MEYCIQCZY+QOSx3fq/vwp6r1lHOeMHPZW1Tct6cG4mAKbYIidQIhALeUx4OA9pv3wmD7h0aW39H6C5Lj482TEUlxejctj4Tm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@praha%2fenvelop-request-cache@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":12127},"main":"./dist/cjs/index.cjs","type":"module","_from":"file:praha-envelop-request-cache-1.2.0.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","exports":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.cjs"}},"scripts":{"test":"vitest run","build":"rslib build","lint:code":"eslint .","lint:type":"tsc --noEmit","test:watch":"vitest watch"},"_npmUser":{"name":"karibash","email":"y.karibayashi@gmail.com"},"_resolved":"/tmp/a7d27dbabfe19f0f3c96acfb623089c7/praha-envelop-request-cache-1.2.0.tgz","_integrity":"sha512-aHhz2b2NVBVU3knqPiBFGm9K4z3BtkS31j7wf4Aaunf+E14DvTm0/tRS+5HINWsu+EbrrB9/PvXazpfCg1ggVg==","repository":{"url":"git+https://github.com/praha-inc/envelop-plugins.git","type":"git","directory":"packages/request-cache"},"_npmVersion":"10.8.2","description":"This plugin caches arbitrary values within the request scope to optimize execution flow","directories":{},"_nodeVersion":"20.19.1","publishConfig":{"provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.27.0","vitest":"3.1.4","typescript":"5.8.3","@rslib/core":"0.9.0","@types/node":"22.15.21","@envelop/core":"5.2.3","@envelop/testing":"8.1.3","@graphql-tools/schema":"10.0.23"},"peerDependencies":{"@envelop/core":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/envelop-request-cache_1.2.0_1748348751157_0.5524326352893274","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@praha/envelop-request-cache","version":"1.2.1","keywords":["javascript","typescript","graphql","envelop","cache"],"author":{"name":"PrAha, Inc."},"license":"MIT","_id":"@praha/envelop-request-cache@1.2.1","maintainers":[{"name":"karibash","email":"y.karibayashi@gmail.com"},{"name":"zack-msyc86","email":"okazaki@praha-inc.com"}],"homepage":"https://github.com/praha-inc/envelop-plugins/blob/main/packages/request-cache/README.md","bugs":{"url":"https://github.com/praha-inc/envelop-plugins/issues"},"dist":{"shasum":"9e716cd73f304f23288a462b15e2ef9f90461cb5","tarball":"https://registry.npmjs.org/@praha/envelop-request-cache/-/envelop-request-cache-1.2.1.tgz","fileCount":7,"integrity":"sha512-lMz6vSD2GKe6luljetauUakKkUt3NE3CXLPkLX1x9kA3r7IdHSrNFVHwERzjBYeF/L6f9naXVjMT6a7Jk9Jqgg==","signatures":[{"sig":"MEQCIA0qTO2R+ueXfq+XXO+Ol1eoywupj/aY/CLQZJYPQmwFAiBOeKcm2m0Y6ol4sYQuTutbwniJmHEPdC4X8qbrgHBuSg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@praha%2fenvelop-request-cache@1.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":12062},"main":"./dist/cjs/index.cjs","type":"module","_from":"file:praha-envelop-request-cache-1.2.1.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","exports":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.cjs"}},"scripts":{"test":"vitest run","build":"rslib build","lint:code":"eslint .","lint:type":"tsc --noEmit","test:watch":"vitest watch"},"_npmUser":{"name":"karibash","email":"y.karibayashi@gmail.com"},"_resolved":"/tmp/c82493fd1bf7e62ea60819181faf1418/praha-envelop-request-cache-1.2.1.tgz","_integrity":"sha512-lMz6vSD2GKe6luljetauUakKkUt3NE3CXLPkLX1x9kA3r7IdHSrNFVHwERzjBYeF/L6f9naXVjMT6a7Jk9Jqgg==","repository":{"url":"git+https://github.com/praha-inc/envelop-plugins.git","type":"git","directory":"packages/request-cache"},"_npmVersion":"10.8.2","description":"This plugin caches arbitrary values within the request scope to optimize execution flow","directories":{},"sideEffects":"false","_nodeVersion":"20.19.2","publishConfig":{"provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.28.0","vitest":"3.2.3","typescript":"5.8.3","@rslib/core":"0.9.2","@types/node":"22.15.31","@envelop/core":"5.2.3","@envelop/testing":"8.1.3","@graphql-tools/schema":"10.0.23"},"peerDependencies":{"@envelop/core":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/envelop-request-cache_1.2.1_1749710452698_0.1205966401563181","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@praha/envelop-request-cache","version":"1.2.2","keywords":["javascript","typescript","graphql","envelop","cache"],"author":{"name":"PrAha, Inc."},"license":"MIT","_id":"@praha/envelop-request-cache@1.2.2","maintainers":[{"name":"karibash","email":"y.karibayashi@gmail.com"},{"name":"zack-msyc86","email":"okazaki@praha-inc.com"}],"homepage":"https://github.com/praha-inc/envelop-plugins/blob/main/packages/request-cache/README.md","bugs":{"url":"https://github.com/praha-inc/envelop-plugins/issues"},"dist":{"shasum":"25a6b086e13a6fdd781c0071e113fa0e073b97ab","tarball":"https://registry.npmjs.org/@praha/envelop-request-cache/-/envelop-request-cache-1.2.2.tgz","fileCount":7,"integrity":"sha512-H7IJZ0saArv0h3ATIxRc8qNaImP4Sp2Nrk6VFV4KVRD8J5a6JQtcPwV+GRjQ5kckTqWOwfnYWLgnAgu7GnCiNA==","signatures":[{"sig":"MEUCIF2bn5ZuDvCLi/Vcq19+ssX6XWU/MTaSgjz3d4VlW1efAiEA99P16ZfMJhDAuHf7lR7wHXmLzfBhbtmsIdClaySe6mU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@praha%2fenvelop-request-cache@1.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":12060},"main":"./dist/cjs/index.cjs","type":"module","_from":"file:praha-envelop-request-cache-1.2.2.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","exports":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.cjs"}},"scripts":{"test":"vitest run","build":"rslib build","lint:code":"eslint .","lint:type":"tsc --noEmit","test:watch":"vitest watch"},"_npmUser":{"name":"karibash","email":"y.karibayashi@gmail.com"},"_resolved":"/tmp/fa4dfbea5d8733e970cfe299cc44b349/praha-envelop-request-cache-1.2.2.tgz","_integrity":"sha512-H7IJZ0saArv0h3ATIxRc8qNaImP4Sp2Nrk6VFV4KVRD8J5a6JQtcPwV+GRjQ5kckTqWOwfnYWLgnAgu7GnCiNA==","repository":{"url":"git+https://github.com/praha-inc/envelop-plugins.git","type":"git","directory":"packages/request-cache"},"_npmVersion":"10.8.2","description":"This plugin caches arbitrary values within the request scope to optimize execution flow","directories":{},"sideEffects":false,"_nodeVersion":"20.19.2","publishConfig":{"provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.28.0","vitest":"3.2.3","typescript":"5.8.3","@rslib/core":"0.9.2","@types/node":"22.15.31","@envelop/core":"5.2.3","@envelop/testing":"8.1.3","@graphql-tools/schema":"10.0.23"},"peerDependencies":{"@envelop/core":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/envelop-request-cache_1.2.2_1749790241310_0.9001254603694862","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"@praha/envelop-request-cache","version":"1.2.3","description":"This plugin caches arbitrary values within the request scope to optimize execution flow","keywords":["javascript","typescript","graphql","envelop","cache"],"homepage":"https://github.com/praha-inc/envelop-plugins/blob/main/packages/request-cache/README.md","bugs":{"url":"https://github.com/praha-inc/envelop-plugins/issues"},"repository":{"type":"git","url":"git+https://github.com/praha-inc/envelop-plugins.git","directory":"packages/request-cache"},"license":"MIT","author":{"name":"PrAha, Inc."},"sideEffects":false,"type":"module","exports":{"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.cjs"},"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}},"main":"./dist/cjs/index.cjs","module":"./dist/esm/index.js","types":"./dist/cjs/index.d.ts","devDependencies":{"@envelop/core":"5.3.2","@envelop/testing":"9.0.0","@graphql-tools/schema":"10.0.25","@rslib/core":"0.13.3","@types/node":"22.18.6","eslint":"9.36.0","typescript":"5.9.2","vitest":"3.2.4"},"peerDependencies":{"@envelop/core":"^5.0.0"},"publishConfig":{"provenance":true},"scripts":{"build":"rslib build","test":"vitest run","test:watch":"vitest watch","lint:code":"eslint .","lint:type":"tsc --noEmit"},"_id":"@praha/envelop-request-cache@1.2.3","_integrity":"sha512-sP8l2GEZkK/llWMQmVi+XpDreIZxr+d0qKMpVVmJPZJlBZLkASOpnsFjSxuWN5exvp0jkRpUDsXUleBujU7agA==","_resolved":"/tmp/c73562626a05281b0bd4fc873be606a7/praha-envelop-request-cache-1.2.3.tgz","_from":"file:praha-envelop-request-cache-1.2.3.tgz","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-sP8l2GEZkK/llWMQmVi+XpDreIZxr+d0qKMpVVmJPZJlBZLkASOpnsFjSxuWN5exvp0jkRpUDsXUleBujU7agA==","shasum":"9c6e65eb660fd7485139bce92665ca1d61a8507c","tarball":"https://registry.npmjs.org/@praha/envelop-request-cache/-/envelop-request-cache-1.2.3.tgz","fileCount":7,"unpackedSize":12060,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@praha%2fenvelop-request-cache@1.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGVOGWwDm46vhiL3tKCTVLTsAdE2/9pyn6A3dfVOA/CAAiBlWsVeJVbxr+t46kdwXUrJSrNa2FVZNfgV2Wg04yWhkQ=="}]},"_npmUser":{"name":"karibash","email":"y.karibayashi@gmail.com"},"directories":{},"maintainers":[{"name":"karibash","email":"y.karibayashi@gmail.com"},{"name":"zack-msyc86","email":"okazaki@praha-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/envelop-request-cache_1.2.3_1758537842285_0.2694341892831895"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-25T07:07:50.314Z","modified":"2025-09-22T10:44:02.932Z","1.0.0-alpha.0":"2025-03-25T07:07:50.567Z","1.0.0":"2025-03-25T08:33:48.371Z","1.1.0":"2025-04-03T14:44:23.416Z","1.2.0":"2025-05-27T12:25:51.369Z","1.2.1":"2025-06-12T06:40:52.869Z","1.2.2":"2025-06-13T04:50:41.490Z","1.2.3":"2025-09-22T10:44:02.496Z"},"bugs":{"url":"https://github.com/praha-inc/envelop-plugins/issues"},"author":{"name":"PrAha, Inc."},"license":"MIT","homepage":"https://github.com/praha-inc/envelop-plugins/blob/main/packages/request-cache/README.md","keywords":["javascript","typescript","graphql","envelop","cache"],"repository":{"type":"git","url":"git+https://github.com/praha-inc/envelop-plugins.git","directory":"packages/request-cache"},"description":"This plugin caches arbitrary values within the request scope to optimize execution flow","maintainers":[{"name":"karibash","email":"y.karibayashi@gmail.com"},{"name":"zack-msyc86","email":"okazaki@praha-inc.com"}],"readme":"# @praha/envelop-request-cache\n\n[![npm version](https://badge.fury.io/js/@praha%2Fenvelop-request-cache.svg)](https://www.npmjs.com/package/@praha/envelop-request-cache)\n[![npm download](https://img.shields.io/npm/dm/@praha/envelop-request-cache.svg)](https://www.npmjs.com/package/@praha/envelop-request-cache)\n[![license](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/praha-inc/envelop-request-cache/blob/main/LICENSE)\n[![Github](https://img.shields.io/github/followers/praha-inc?label=Follow&logo=github&style=social)](https://github.com/orgs/praha-inc/followers)\n\nThis plugin caches arbitrary values within the request scope to optimize execution flow.\n\n## 👏 Getting Started\n\n### Installation\n\n```bash\nnpm install @praha/envelop-request-cache\n```\n\n### Usage\n\nThis plugin provides request-scoped caching for any arbitrary values using `AsyncLocalStorage`.\nIt's useful for caching expensive computations or shared values (like user information or `DataLoader` instances) within a single GraphQL execution.\n\n#### Basic: Caching a resolved user per request\n\nIn this example, we cache the result of a `getUserById` function so that it's only called once per request.\n\n```ts\nimport { createServer } from 'node:http';\n\nimport { makeExecutableSchema } from '@graphql-tools/schema';\nimport { cache, useRequestCache } from '@praha/envelop-request-cache';\nimport { createYoga } from 'graphql-yoga';\n\n// Wrap your function with `cache`\nconst getUserById = cache(async (id: string) => {\n  console.log('Fetching user...');\n  return { id, name: `User: ${id}` };\n});\n\nconst typeDefs = /* GraphQL */ `\n  type User {\n    id: ID!\n    name: String!\n  }\n\n  type Query {\n    me: User\n  }\n`;\n\nconst resolvers = {\n  Query: {\n    me: async () => {\n      // This will only call `getUserById` once per request, even if reused\n      return getUserById('1');\n    },\n  },\n};\n\nconst schema = makeExecutableSchema({ typeDefs, resolvers });\n\nconst yoga = createYoga({\n  schema,\n  plugins: [useRequestCache()],\n});\n\nconst server = createServer(yoga);\n\nserver.listen(4000, () => {\n  console.info('Server is running on http://localhost:4000/graphql');\n});\n```\n\nEven if `getUserById('user-1')` is called multiple times during a request, it will only resolve once and return the cached value.\n\n#### Advanced: Caching a `DataLoader` instance per request\n\nYou can use the request cache to instantiate and reuse a `DataLoader` per request, ensuring batch loading works as expected within each request scope.\n\n```ts\nimport { cache } from '@praha/envelop-request-cache';\nimport DataLoader from 'dataloader';\n\n// Cache the factory function so that only one instance is created per request\nconst getUserLoader = cache(() => {\n  return new DataLoader(async (ids: readonly string[]) => {\n    console.log('Batch loading users...');\n    return ids.map((id) => ({ id, name: `User: ${id}` }));\n  });\n});\n\nconst resolvers = {\n  Query: {\n    me: async () => {\n      const loader = getUserLoader();\n      return loader.load('1');\n    },\n    users: async () => {\n      const loader = getUserLoader();\n      return Promise.all([loader.load('1'), loader.load('2')]);\n    },\n  },\n};\n```\n\nWith this setup, `getUserLoader` is only called once per request, and all `load()` calls share the same loader instance for batching and caching.\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome.\n\nFeel free to check [issues page](https://github.com/praha-inc/envelop-plugins/issues) if you want to contribute.\n\n## 📝 License\n\nCopyright © [PrAha, Inc.](https://www.praha-inc.com/)\n\nThis project is [```MIT```](https://github.com/praha-inc/envelop-plugins/blob/main/packages/request-cache/LICENSE) licensed.\n","readmeFilename":"README.md"}