@graphql-mesh/plugin-http-cache 1.0.0-alpha-20230523154127-518d8667d → 1.0.0-alpha-20230523154231-8c60b52d9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +1 -1
- package/esm/index.js +1 -1
- package/package.json +3 -6
package/cjs/index.js
CHANGED
|
@@ -35,7 +35,7 @@ function useHTTPCache({ cache, matches, ignores, }) {
|
|
|
35
35
|
if (cacheEntry) {
|
|
36
36
|
const policy = http_cache_semantics_1.default.fromObject(cacheEntry.policy);
|
|
37
37
|
setFetchFn(async (url, options, context, info) => {
|
|
38
|
-
if (options.cache !== 'reload' && policy
|
|
38
|
+
if (options.cache !== 'reload' && (policy === null || policy === void 0 ? void 0 : policy.satisfiesWithoutRevalidation(policyRequest))) {
|
|
39
39
|
const resHeaders = {};
|
|
40
40
|
const policyHeaders = policy.responseHeaders();
|
|
41
41
|
for (const key in policyHeaders) {
|
package/esm/index.js
CHANGED
|
@@ -32,7 +32,7 @@ export default function useHTTPCache({ cache, matches, ignores, }) {
|
|
|
32
32
|
if (cacheEntry) {
|
|
33
33
|
const policy = CachePolicy.fromObject(cacheEntry.policy);
|
|
34
34
|
setFetchFn(async (url, options, context, info) => {
|
|
35
|
-
if (options.cache !== 'reload' && policy
|
|
35
|
+
if (options.cache !== 'reload' && (policy === null || policy === void 0 ? void 0 : policy.satisfiesWithoutRevalidation(policyRequest))) {
|
|
36
36
|
const resHeaders = {};
|
|
37
37
|
const policyHeaders = policy.responseHeaders();
|
|
38
38
|
for (const key in policyHeaders) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/plugin-http-cache",
|
|
3
|
-
"version": "1.0.0-alpha-
|
|
3
|
+
"version": "1.0.0-alpha-20230523154231-8c60b52d9",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@graphql-mesh/types": "1.0.0-alpha-
|
|
7
|
-
"@graphql-mesh/utils": "1.0.0-alpha-
|
|
6
|
+
"@graphql-mesh/types": "1.0.0-alpha-20230523154231-8c60b52d9",
|
|
7
|
+
"@graphql-mesh/utils": "1.0.0-alpha-20230523154231-8c60b52d9",
|
|
8
8
|
"graphql": "*",
|
|
9
9
|
"tslib": "^2.4.0"
|
|
10
10
|
},
|
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"directory": "packages/plugins/http-cache"
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
|
-
"engines": {
|
|
22
|
-
"node": ">=16.0.0"
|
|
23
|
-
},
|
|
24
21
|
"main": "cjs/index.js",
|
|
25
22
|
"module": "esm/index.js",
|
|
26
23
|
"typings": "typings/index.d.ts",
|