@graphql-hive/core 0.20.0 → 0.20.1-alpha-20260120170815-45551ffe59052fb3f65939991fce979f0f36b1fb
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/client/persisted-documents.js +2 -2
- package/cjs/client/usage.js +2 -3
- package/cjs/version.js +1 -1
- package/esm/client/persisted-documents.js +2 -2
- package/esm/client/usage.js +2 -2
- package/esm/version.js +1 -1
- package/package.json +2 -2
- package/typings/client/__generated__/types.d.cts +29 -0
- package/typings/client/__generated__/types.d.ts +29 -0
- package/typings/client/usage.d.cts +1 -1
- package/typings/client/usage.d.ts +1 -1
- package/typings/version.d.cts +1 -1
- package/typings/version.d.ts +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createPersistedDocuments = createPersistedDocuments;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const tiny_lru_1 =
|
|
5
|
+
const tiny_lru_1 = require("tiny-lru");
|
|
6
6
|
const circuit_js_1 = tslib_1.__importDefault(require("../circuit-breaker/circuit.js"));
|
|
7
7
|
const circuit_breaker_js_1 = require("./circuit-breaker.js");
|
|
8
8
|
const http_client_js_1 = require("./http-client.js");
|
|
@@ -69,7 +69,7 @@ function createValidationError(documentId, error) {
|
|
|
69
69
|
function createPersistedDocuments(config) {
|
|
70
70
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
71
71
|
// L1
|
|
72
|
-
const persistedDocumentsCache = (0, tiny_lru_1.
|
|
72
|
+
const persistedDocumentsCache = (0, tiny_lru_1.lru)((_a = config.cache) !== null && _a !== void 0 ? _a : 10000);
|
|
73
73
|
// L2
|
|
74
74
|
const layer2Cache = (_b = config.layer2Cache) === null || _b === void 0 ? void 0 : _b.cache;
|
|
75
75
|
let layer2TtlSeconds = (_c = config.layer2Cache) === null || _c === void 0 ? void 0 : _c.ttlSeconds;
|
package/cjs/client/usage.js
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createUsage = createUsage;
|
|
4
4
|
exports.createCollector = createCollector;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
5
|
const graphql_1 = require("graphql");
|
|
7
|
-
const tiny_lru_1 =
|
|
6
|
+
const tiny_lru_1 = require("tiny-lru");
|
|
8
7
|
const operation_js_1 = require("../normalize/operation.js");
|
|
9
8
|
const version_js_1 = require("../version.js");
|
|
10
9
|
const agent_js_1 = require("./agent.js");
|
|
@@ -274,7 +273,7 @@ function createCollector({ schema, max, ttl, processVariables = false, }) {
|
|
|
274
273
|
}
|
|
275
274
|
return (0, utils_js_1.cache)(collect, function cacheKey(doc, variables) {
|
|
276
275
|
return (0, utils_js_1.cacheDocumentKey)(doc, processVariables === true ? variables : null);
|
|
277
|
-
}, (0, tiny_lru_1.
|
|
276
|
+
}, (0, tiny_lru_1.lru)(max, ttl));
|
|
278
277
|
}
|
|
279
278
|
const defaultClientNameHeaders = ['x-graphql-client-name', 'graphql-client-name'];
|
|
280
279
|
const defaultClientVersionHeaders = ['x-graphql-client-version', 'graphql-client-version'];
|
package/cjs/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { lru } from 'tiny-lru';
|
|
2
2
|
import CircuitBreaker from '../circuit-breaker/circuit.js';
|
|
3
3
|
import { defaultCircuitBreakerConfiguration } from './circuit-breaker.js';
|
|
4
4
|
import { http } from './http-client.js';
|
|
@@ -65,7 +65,7 @@ function createValidationError(documentId, error) {
|
|
|
65
65
|
export function createPersistedDocuments(config) {
|
|
66
66
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
67
67
|
// L1
|
|
68
|
-
const persistedDocumentsCache =
|
|
68
|
+
const persistedDocumentsCache = lru((_a = config.cache) !== null && _a !== void 0 ? _a : 10000);
|
|
69
69
|
// L2
|
|
70
70
|
const layer2Cache = (_b = config.layer2Cache) === null || _b === void 0 ? void 0 : _b.cache;
|
|
71
71
|
let layer2TtlSeconds = (_c = config.layer2Cache) === null || _c === void 0 ? void 0 : _c.ttlSeconds;
|
package/esm/client/usage.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Kind, TypeInfo, } from 'graphql';
|
|
2
|
-
import
|
|
2
|
+
import { lru } from 'tiny-lru';
|
|
3
3
|
import { normalizeOperation } from '../normalize/operation.js';
|
|
4
4
|
import { version } from '../version.js';
|
|
5
5
|
import { createAgent } from './agent.js';
|
|
@@ -269,7 +269,7 @@ export function createCollector({ schema, max, ttl, processVariables = false, })
|
|
|
269
269
|
}
|
|
270
270
|
return cache(collect, function cacheKey(doc, variables) {
|
|
271
271
|
return cacheDocumentKey(doc, processVariables === true ? variables : null);
|
|
272
|
-
},
|
|
272
|
+
}, lru(max, ttl));
|
|
273
273
|
}
|
|
274
274
|
const defaultClientNameHeaders = ['x-graphql-client-name', 'graphql-client-name'];
|
|
275
275
|
const defaultClientVersionHeaders = ['x-graphql-client-version', 'graphql-client-version'];
|
package/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.20.
|
|
1
|
+
export const version = '0.20.1-alpha-20260120170815-45551ffe59052fb3f65939991fce979f0f36b1fb';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-hive/core",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1-alpha-20260120170815-45551ffe59052fb3f65939991fce979f0f36b1fb",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"events": "^3.3.0",
|
|
15
15
|
"js-md5": "0.8.3",
|
|
16
16
|
"lodash.sortby": "^4.7.0",
|
|
17
|
-
"tiny-lru": "^
|
|
17
|
+
"tiny-lru": "^11.4.7"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
@@ -100,6 +100,31 @@ export type ActivateAppDeploymentInput = {
|
|
|
100
100
|
appVersion: Scalars['String']['input'];
|
|
101
101
|
target?: InputMaybe<TargetReferenceInput>;
|
|
102
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* Filter options for querying active app deployments.
|
|
105
|
+
* The date filters (lastUsedBefore, neverUsedAndCreatedBefore) use OR semantics:
|
|
106
|
+
* a deployment is included if it matches either date condition.
|
|
107
|
+
* If no date filters are provided, all active deployments are returned.
|
|
108
|
+
*/
|
|
109
|
+
export type ActiveAppDeploymentsFilter = {
|
|
110
|
+
/**
|
|
111
|
+
* Returns deployments that were last used before the given timestamp.
|
|
112
|
+
* Useful for identifying stale or inactive deployments that have been used
|
|
113
|
+
* at least once but not recently.
|
|
114
|
+
*/
|
|
115
|
+
lastUsedBefore?: InputMaybe<Scalars['DateTime']['input']>;
|
|
116
|
+
/**
|
|
117
|
+
* Filter by app deployment name. Case-insensitive partial match.
|
|
118
|
+
* Applied with AND semantics to narrow down results.
|
|
119
|
+
*/
|
|
120
|
+
name?: InputMaybe<Scalars['String']['input']>;
|
|
121
|
+
/**
|
|
122
|
+
* Returns deployments that have never been used and were created before
|
|
123
|
+
* the given timestamp. Useful for identifying old, unused deployments
|
|
124
|
+
* that may be candidates for cleanup.
|
|
125
|
+
*/
|
|
126
|
+
neverUsedAndCreatedBefore?: InputMaybe<Scalars['DateTime']['input']>;
|
|
127
|
+
};
|
|
103
128
|
export type AddAlertChannelInput = {
|
|
104
129
|
name: Scalars['String']['input'];
|
|
105
130
|
organizationSlug: Scalars['String']['input'];
|
|
@@ -147,6 +172,8 @@ export type AnswerOrganizationTransferRequestInput = {
|
|
|
147
172
|
};
|
|
148
173
|
export type AppDeploymentDocumentsFilterInput = {
|
|
149
174
|
operationName?: InputMaybe<Scalars['String']['input']>;
|
|
175
|
+
/** Filter documents that use any of the specified schema coordinates. */
|
|
176
|
+
schemaCoordinates?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
150
177
|
};
|
|
151
178
|
export type AppDeploymentOperation = {
|
|
152
179
|
/** GraphQL operation body. */
|
|
@@ -218,6 +245,8 @@ export type ClientStatsByTargetsInput = {
|
|
|
218
245
|
export type ConditionalBreakingChangeConfigurationInput = {
|
|
219
246
|
/** Whether a percentage or absolute value should be used for the conditional breaking changes treshold. */
|
|
220
247
|
breakingChangeFormula?: InputMaybe<BreakingChangeFormulaType>;
|
|
248
|
+
/** List of app deployment names that are excluded from the breaking change detection. */
|
|
249
|
+
excludedAppDeployments?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
221
250
|
/** List of client names that are excluded from the breaking change detection. */
|
|
222
251
|
excludedClients?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
223
252
|
/** Update whethe the conditional breaking change detection is enabled or disabled. */
|
|
@@ -100,6 +100,31 @@ export type ActivateAppDeploymentInput = {
|
|
|
100
100
|
appVersion: Scalars['String']['input'];
|
|
101
101
|
target?: InputMaybe<TargetReferenceInput>;
|
|
102
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* Filter options for querying active app deployments.
|
|
105
|
+
* The date filters (lastUsedBefore, neverUsedAndCreatedBefore) use OR semantics:
|
|
106
|
+
* a deployment is included if it matches either date condition.
|
|
107
|
+
* If no date filters are provided, all active deployments are returned.
|
|
108
|
+
*/
|
|
109
|
+
export type ActiveAppDeploymentsFilter = {
|
|
110
|
+
/**
|
|
111
|
+
* Returns deployments that were last used before the given timestamp.
|
|
112
|
+
* Useful for identifying stale or inactive deployments that have been used
|
|
113
|
+
* at least once but not recently.
|
|
114
|
+
*/
|
|
115
|
+
lastUsedBefore?: InputMaybe<Scalars['DateTime']['input']>;
|
|
116
|
+
/**
|
|
117
|
+
* Filter by app deployment name. Case-insensitive partial match.
|
|
118
|
+
* Applied with AND semantics to narrow down results.
|
|
119
|
+
*/
|
|
120
|
+
name?: InputMaybe<Scalars['String']['input']>;
|
|
121
|
+
/**
|
|
122
|
+
* Returns deployments that have never been used and were created before
|
|
123
|
+
* the given timestamp. Useful for identifying old, unused deployments
|
|
124
|
+
* that may be candidates for cleanup.
|
|
125
|
+
*/
|
|
126
|
+
neverUsedAndCreatedBefore?: InputMaybe<Scalars['DateTime']['input']>;
|
|
127
|
+
};
|
|
103
128
|
export type AddAlertChannelInput = {
|
|
104
129
|
name: Scalars['String']['input'];
|
|
105
130
|
organizationSlug: Scalars['String']['input'];
|
|
@@ -147,6 +172,8 @@ export type AnswerOrganizationTransferRequestInput = {
|
|
|
147
172
|
};
|
|
148
173
|
export type AppDeploymentDocumentsFilterInput = {
|
|
149
174
|
operationName?: InputMaybe<Scalars['String']['input']>;
|
|
175
|
+
/** Filter documents that use any of the specified schema coordinates. */
|
|
176
|
+
schemaCoordinates?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
150
177
|
};
|
|
151
178
|
export type AppDeploymentOperation = {
|
|
152
179
|
/** GraphQL operation body. */
|
|
@@ -218,6 +245,8 @@ export type ClientStatsByTargetsInput = {
|
|
|
218
245
|
export type ConditionalBreakingChangeConfigurationInput = {
|
|
219
246
|
/** Whether a percentage or absolute value should be used for the conditional breaking changes treshold. */
|
|
220
247
|
breakingChangeFormula?: InputMaybe<BreakingChangeFormulaType>;
|
|
248
|
+
/** List of app deployment names that are excluded from the breaking change detection. */
|
|
249
|
+
excludedAppDeployments?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
221
250
|
/** List of client names that are excluded from the breaking change detection. */
|
|
222
251
|
excludedClients?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
223
252
|
/** Update whethe the conditional breaking change detection is enabled or disabled. */
|
package/typings/version.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.20.
|
|
1
|
+
export declare const version = "0.20.1-alpha-20260120170815-45551ffe59052fb3f65939991fce979f0f36b1fb";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/typings/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.20.
|
|
1
|
+
export declare const version = "0.20.1-alpha-20260120170815-45551ffe59052fb3f65939991fce979f0f36b1fb";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|