@graphql-hive/apollo 0.46.0-alpha-20260105114825-21a288f5ce8422d00716d16112b4066f405342dc → 0.46.0-alpha-20260105115658-189b8e1d7e2ee1504f3150b4caf8364af3fba057
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 +8 -3
- package/cjs/version.js +1 -1
- package/esm/index.js +8 -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
|
@@ -115,8 +115,13 @@ function getPersistedDocumentsCacheFromContext(ctx) {
|
|
|
115
115
|
return undefined;
|
|
116
116
|
}
|
|
117
117
|
function createHive(clientOrOptions, ctx) {
|
|
118
|
+
var _a;
|
|
118
119
|
const persistedDocumentsCache = getPersistedDocumentsCacheFromContext(ctx);
|
|
119
|
-
|
|
120
|
+
// Only use context logger if user didn't provide their own
|
|
121
|
+
const contextLogger = !clientOrOptions.logger && !((_a = clientOrOptions.agent) === null || _a === void 0 ? void 0 : _a.logger)
|
|
122
|
+
? getLoggerFromContext(ctx)
|
|
123
|
+
: undefined;
|
|
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
|
|
120
125
|
? Object.assign(Object.assign({}, clientOrOptions.experimental__persistedDocuments), { layer2Cache: persistedDocumentsCache || clientOrOptions.experimental__persistedDocuments.layer2Cache
|
|
121
126
|
? Object.assign({ cache: persistedDocumentsCache }, (clientOrOptions.experimental__persistedDocuments.layer2Cache || {})) : undefined }) : undefined }));
|
|
122
127
|
}
|
|
@@ -337,7 +342,7 @@ function useHive(clientOrOptions) {
|
|
|
337
342
|
if (isLegacyV0) {
|
|
338
343
|
return {
|
|
339
344
|
async serverWillStop() {
|
|
340
|
-
if (hive[core_1.autoDisposeSymbol]) {
|
|
345
|
+
if (hive === null || hive === void 0 ? void 0 : hive[core_1.autoDisposeSymbol]) {
|
|
341
346
|
await hive.dispose();
|
|
342
347
|
}
|
|
343
348
|
},
|
|
@@ -346,7 +351,7 @@ function useHive(clientOrOptions) {
|
|
|
346
351
|
// Works on v3 and v4
|
|
347
352
|
return Promise.resolve({
|
|
348
353
|
async serverWillStop() {
|
|
349
|
-
if (hive[core_1.autoDisposeSymbol]) {
|
|
354
|
+
if (hive === null || hive === void 0 ? void 0 : hive[core_1.autoDisposeSymbol]) {
|
|
350
355
|
await hive.dispose();
|
|
351
356
|
}
|
|
352
357
|
},
|
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-alpha-
|
|
4
|
+
exports.version = '0.46.0-alpha-20260105115658-189b8e1d7e2ee1504f3150b4caf8364af3fba057';
|
package/esm/index.js
CHANGED
|
@@ -105,8 +105,13 @@ function getPersistedDocumentsCacheFromContext(ctx) {
|
|
|
105
105
|
return undefined;
|
|
106
106
|
}
|
|
107
107
|
export function createHive(clientOrOptions, ctx) {
|
|
108
|
+
var _a;
|
|
108
109
|
const persistedDocumentsCache = getPersistedDocumentsCacheFromContext(ctx);
|
|
109
|
-
|
|
110
|
+
// Only use context logger if user didn't provide their own
|
|
111
|
+
const contextLogger = !clientOrOptions.logger && !((_a = clientOrOptions.agent) === null || _a === void 0 ? void 0 : _a.logger)
|
|
112
|
+
? getLoggerFromContext(ctx)
|
|
113
|
+
: undefined;
|
|
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
|
|
110
115
|
? Object.assign(Object.assign({}, clientOrOptions.experimental__persistedDocuments), { layer2Cache: persistedDocumentsCache || clientOrOptions.experimental__persistedDocuments.layer2Cache
|
|
111
116
|
? Object.assign({ cache: persistedDocumentsCache }, (clientOrOptions.experimental__persistedDocuments.layer2Cache || {})) : undefined }) : undefined }));
|
|
112
117
|
}
|
|
@@ -327,7 +332,7 @@ export function useHive(clientOrOptions) {
|
|
|
327
332
|
if (isLegacyV0) {
|
|
328
333
|
return {
|
|
329
334
|
async serverWillStop() {
|
|
330
|
-
if (hive[autoDisposeSymbol]) {
|
|
335
|
+
if (hive === null || hive === void 0 ? void 0 : hive[autoDisposeSymbol]) {
|
|
331
336
|
await hive.dispose();
|
|
332
337
|
}
|
|
333
338
|
},
|
|
@@ -336,7 +341,7 @@ export function useHive(clientOrOptions) {
|
|
|
336
341
|
// Works on v3 and v4
|
|
337
342
|
return Promise.resolve({
|
|
338
343
|
async serverWillStop() {
|
|
339
|
-
if (hive[autoDisposeSymbol]) {
|
|
344
|
+
if (hive === null || hive === void 0 ? void 0 : hive[autoDisposeSymbol]) {
|
|
340
345
|
await hive.dispose();
|
|
341
346
|
}
|
|
342
347
|
},
|
package/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.46.0-alpha-
|
|
1
|
+
export const version = '0.46.0-alpha-20260105115658-189b8e1d7e2ee1504f3150b4caf8364af3fba057';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-hive/apollo",
|
|
3
|
-
"version": "0.46.0-alpha-
|
|
3
|
+
"version": "0.46.0-alpha-20260105115658-189b8e1d7e2ee1504f3150b4caf8364af3fba057",
|
|
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-alpha-
|
|
12
|
+
"@graphql-hive/core": "0.19.0-alpha-20260105115658-189b8e1d7e2ee1504f3150b4caf8364af3fba057"
|
|
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.46.0-alpha-
|
|
1
|
+
export declare const version = "0.46.0-alpha-20260105115658-189b8e1d7e2ee1504f3150b4caf8364af3fba057";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/typings/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.46.0-alpha-
|
|
1
|
+
export declare const version = "0.46.0-alpha-20260105115658-189b8e1d7e2ee1504f3150b4caf8364af3fba057";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|