@graphql-hive/apollo 0.46.0 → 0.47.0-rc-20260107125616-c72aa9a25a868a0108f9af39de795a75f28c1c3b
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 +13 -3
- package/cjs/version.js +1 -1
- package/esm/index.js +13 -3
- package/esm/version.js +1 -1
- package/package.json +2 -2
- package/typings/version.d.cts +1 -1
- package/typings/version.d.ts +1 -1
package/cjs/index.js
CHANGED
|
@@ -122,8 +122,14 @@ function createHive(clientOrOptions, ctx) {
|
|
|
122
122
|
? getLoggerFromContext(ctx)
|
|
123
123
|
: undefined;
|
|
124
124
|
return (0, core_1.createHive)(Object.assign(Object.assign({ logger: contextLogger }, clientOrOptions), { agent: Object.assign({ name: 'hive-client-apollo', version: version_js_1.version }, clientOrOptions.agent), experimental__persistedDocuments: clientOrOptions.experimental__persistedDocuments
|
|
125
|
-
? Object.assign(Object.assign({}, clientOrOptions.experimental__persistedDocuments), { layer2Cache:
|
|
126
|
-
|
|
125
|
+
? Object.assign(Object.assign({}, clientOrOptions.experimental__persistedDocuments), { layer2Cache: (() => {
|
|
126
|
+
var _a;
|
|
127
|
+
const userL2Config = (_a = clientOrOptions.experimental__persistedDocuments) === null || _a === void 0 ? void 0 : _a.layer2Cache;
|
|
128
|
+
if (persistedDocumentsCache) {
|
|
129
|
+
return Object.assign({ cache: persistedDocumentsCache }, (userL2Config || {}));
|
|
130
|
+
}
|
|
131
|
+
return userL2Config;
|
|
132
|
+
})() }) : undefined }));
|
|
127
133
|
}
|
|
128
134
|
function useHive(clientOrOptions) {
|
|
129
135
|
let hive;
|
|
@@ -220,7 +226,11 @@ function useHive(clientOrOptions) {
|
|
|
220
226
|
typeof context.request.http.body.documentId === 'string') {
|
|
221
227
|
persistedDocumentHash = context.request.http.body.documentId;
|
|
222
228
|
try {
|
|
223
|
-
|
|
229
|
+
// Pass waitUntil from context if available for serverless environments
|
|
230
|
+
const contextValue = isLegacyV3
|
|
231
|
+
? context.context
|
|
232
|
+
: context.contextValue;
|
|
233
|
+
const document = await hive.experimental__persistedDocuments.resolve(context.request.http.body.documentId, { waitUntil: contextValue === null || contextValue === void 0 ? void 0 : contextValue.waitUntil });
|
|
224
234
|
if (document) {
|
|
225
235
|
context.request.query = document;
|
|
226
236
|
}
|
package/cjs/version.js
CHANGED
package/esm/index.js
CHANGED
|
@@ -112,8 +112,14 @@ export function createHive(clientOrOptions, ctx) {
|
|
|
112
112
|
? getLoggerFromContext(ctx)
|
|
113
113
|
: undefined;
|
|
114
114
|
return createHiveClient(Object.assign(Object.assign({ logger: contextLogger }, clientOrOptions), { agent: Object.assign({ name: 'hive-client-apollo', version }, clientOrOptions.agent), experimental__persistedDocuments: clientOrOptions.experimental__persistedDocuments
|
|
115
|
-
? Object.assign(Object.assign({}, clientOrOptions.experimental__persistedDocuments), { layer2Cache:
|
|
116
|
-
|
|
115
|
+
? Object.assign(Object.assign({}, clientOrOptions.experimental__persistedDocuments), { layer2Cache: (() => {
|
|
116
|
+
var _a;
|
|
117
|
+
const userL2Config = (_a = clientOrOptions.experimental__persistedDocuments) === null || _a === void 0 ? void 0 : _a.layer2Cache;
|
|
118
|
+
if (persistedDocumentsCache) {
|
|
119
|
+
return Object.assign({ cache: persistedDocumentsCache }, (userL2Config || {}));
|
|
120
|
+
}
|
|
121
|
+
return userL2Config;
|
|
122
|
+
})() }) : undefined }));
|
|
117
123
|
}
|
|
118
124
|
export function useHive(clientOrOptions) {
|
|
119
125
|
let hive;
|
|
@@ -210,7 +216,11 @@ export function useHive(clientOrOptions) {
|
|
|
210
216
|
typeof context.request.http.body.documentId === 'string') {
|
|
211
217
|
persistedDocumentHash = context.request.http.body.documentId;
|
|
212
218
|
try {
|
|
213
|
-
|
|
219
|
+
// Pass waitUntil from context if available for serverless environments
|
|
220
|
+
const contextValue = isLegacyV3
|
|
221
|
+
? context.context
|
|
222
|
+
: context.contextValue;
|
|
223
|
+
const document = await hive.experimental__persistedDocuments.resolve(context.request.http.body.documentId, { waitUntil: contextValue === null || contextValue === void 0 ? void 0 : contextValue.waitUntil });
|
|
214
224
|
if (document) {
|
|
215
225
|
context.request.query = document;
|
|
216
226
|
}
|
package/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.
|
|
1
|
+
export const version = '0.47.0-rc-20260107125616-c72aa9a25a868a0108f9af39de795a75f28c1c3b';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-hive/apollo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0-rc-20260107125616-c72aa9a25a868a0108f9af39de795a75f28c1c3b",
|
|
4
4
|
"description": "GraphQL Hive + Apollo Server",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@graphql-hive/logger": "^1.0.9",
|
|
12
|
-
"@graphql-hive/core": "0.
|
|
12
|
+
"@graphql-hive/core": "0.20.0-rc-20260107125616-c72aa9a25a868a0108f9af39de795a75f28c1c3b"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
package/typings/version.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.
|
|
1
|
+
export declare const version = "0.47.0-rc-20260107125616-c72aa9a25a868a0108f9af39de795a75f28c1c3b";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/typings/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.
|
|
1
|
+
export declare const version = "0.47.0-rc-20260107125616-c72aa9a25a868a0108f9af39de795a75f28c1c3b";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|