@envelop/response-cache 3.0.0-alpha-868cc42.0 → 3.0.0-alpha-6a4e0e2.0
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/index.js +1 -2
- package/index.mjs +1 -2
- package/package.json +1 -1
- package/plugin.d.ts +1 -5
package/index.js
CHANGED
|
@@ -263,9 +263,8 @@ includeExtensionMetadata = typeof process !== 'undefined' ? process.env['NODE_EN
|
|
|
263
263
|
}
|
|
264
264
|
const operationId = await buildResponseCacheKey({
|
|
265
265
|
documentString: getDocumentString(ctx.args),
|
|
266
|
-
variableValues: ctx.args.variableValues,
|
|
267
|
-
operationName: ctx.args.operationName,
|
|
268
266
|
sessionId: session(ctx.args.contextValue),
|
|
267
|
+
...ctx.args,
|
|
269
268
|
});
|
|
270
269
|
if (((_a = enabled === null || enabled === void 0 ? void 0 : enabled(ctx.args.contextValue)) !== null && _a !== void 0 ? _a : true) === true) {
|
|
271
270
|
const cachedResponse = await cache.get(operationId);
|
package/index.mjs
CHANGED
|
@@ -257,9 +257,8 @@ includeExtensionMetadata = typeof process !== 'undefined' ? process.env['NODE_EN
|
|
|
257
257
|
}
|
|
258
258
|
const operationId = await buildResponseCacheKey({
|
|
259
259
|
documentString: getDocumentString(ctx.args),
|
|
260
|
-
variableValues: ctx.args.variableValues,
|
|
261
|
-
operationName: ctx.args.operationName,
|
|
262
260
|
sessionId: session(ctx.args.contextValue),
|
|
261
|
+
...ctx.args,
|
|
263
262
|
});
|
|
264
263
|
if (((_a = enabled === null || enabled === void 0 ? void 0 : enabled(ctx.args.contextValue)) !== null && _a !== void 0 ? _a : true) === true) {
|
|
265
264
|
const cachedResponse = await cache.get(operationId);
|
package/package.json
CHANGED
package/plugin.d.ts
CHANGED
|
@@ -7,13 +7,9 @@ import type { Cache } from './cache';
|
|
|
7
7
|
export declare type BuildResponseCacheKeyFunction = (params: {
|
|
8
8
|
/** Raw document string as sent from the client. */
|
|
9
9
|
documentString: string;
|
|
10
|
-
/** Variable values as sent form the client. */
|
|
11
|
-
variableValues: ExecutionArgs['variableValues'];
|
|
12
|
-
/** The name of the GraphQL operation that should be executed from within the document. */
|
|
13
|
-
operationName?: Maybe<string>;
|
|
14
10
|
/** optional sessionId for make unique cache keys based on the session. */
|
|
15
11
|
sessionId?: Maybe<string>;
|
|
16
|
-
}) => Promise<string>;
|
|
12
|
+
} & ExecutionArgs) => Promise<string>;
|
|
17
13
|
export declare type GetDocumentStringFunction = (executionArgs: ExecutionArgs) => string;
|
|
18
14
|
export declare type ShouldCacheResultFunction = (params: {
|
|
19
15
|
result: ExecutionResult;
|