@graphql-hive/apollo 0.46.0 → 0.47.0-alpha-20260107122401-47a7c87bdb6c6bfe5d80ea4b8ce0c165adc0f0df

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 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: persistedDocumentsCache || clientOrOptions.experimental__persistedDocuments.layer2Cache
126
- ? Object.assign({ cache: persistedDocumentsCache }, (clientOrOptions.experimental__persistedDocuments.layer2Cache || {})) : undefined }) : undefined }));
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
- const document = await hive.experimental__persistedDocuments.resolve(context.request.http.body.documentId);
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
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '0.46.0';
4
+ exports.version = '0.47.0-alpha-20260107122401-47a7c87bdb6c6bfe5d80ea4b8ce0c165adc0f0df';
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: persistedDocumentsCache || clientOrOptions.experimental__persistedDocuments.layer2Cache
116
- ? Object.assign({ cache: persistedDocumentsCache }, (clientOrOptions.experimental__persistedDocuments.layer2Cache || {})) : undefined }) : undefined }));
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
- const document = await hive.experimental__persistedDocuments.resolve(context.request.http.body.documentId);
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.46.0';
1
+ export const version = '0.47.0-alpha-20260107122401-47a7c87bdb6c6bfe5d80ea4b8ce0c165adc0f0df';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-hive/apollo",
3
- "version": "0.46.0",
3
+ "version": "0.47.0-alpha-20260107122401-47a7c87bdb6c6bfe5d80ea4b8ce0c165adc0f0df",
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.19.0"
12
+ "@graphql-hive/core": "0.20.0-alpha-20260107122401-47a7c87bdb6c6bfe5d80ea4b8ce0c165adc0f0df"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
@@ -1,2 +1,2 @@
1
- export declare const version = "0.46.0";
1
+ export declare const version = "0.47.0-alpha-20260107122401-47a7c87bdb6c6bfe5d80ea4b8ce0c165adc0f0df";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const version = "0.46.0";
1
+ export declare const version = "0.47.0-alpha-20260107122401-47a7c87bdb6c6bfe5d80ea4b8ce0c165adc0f0df";
2
2
  //# sourceMappingURL=version.d.ts.map