@graphql-hive/core 0.20.0 → 0.20.1-alpha-20260120163216-4904b133781b2233583b92129932903b1a0ef16f

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.
@@ -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 = tslib_1.__importDefault(require("tiny-lru"));
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.default)((_a = config.cache) !== null && _a !== void 0 ? _a : 10000);
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;
@@ -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 = tslib_1.__importDefault(require("tiny-lru"));
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.default)(max, ttl));
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
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '0.20.0';
4
+ exports.version = '0.20.1-alpha-20260120163216-4904b133781b2233583b92129932903b1a0ef16f';
@@ -1,4 +1,4 @@
1
- import LRU from 'tiny-lru';
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 = LRU((_a = config.cache) !== null && _a !== void 0 ? _a : 10000);
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;
@@ -1,5 +1,5 @@
1
1
  import { Kind, TypeInfo, } from 'graphql';
2
- import LRU from 'tiny-lru';
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
- }, LRU(max, ttl));
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.0';
1
+ export const version = '0.20.1-alpha-20260120163216-4904b133781b2233583b92129932903b1a0ef16f';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-hive/core",
3
- "version": "0.20.0",
3
+ "version": "0.20.1-alpha-20260120163216-4904b133781b2233583b92129932903b1a0ef16f",
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": "^8.0.2"
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'];
@@ -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'];
@@ -30,7 +30,7 @@ export declare function createCollector({ schema, max, ttl, processVariables, }:
30
30
  }): (arg: DocumentNode, arg2: {
31
31
  [key: string]: unknown;
32
32
  } | null) => Promise<{
33
- key: string;
33
+ key: any;
34
34
  value: CacheResult;
35
35
  cacheHit: boolean;
36
36
  }>;
@@ -30,7 +30,7 @@ export declare function createCollector({ schema, max, ttl, processVariables, }:
30
30
  }): (arg: DocumentNode, arg2: {
31
31
  [key: string]: unknown;
32
32
  } | null) => Promise<{
33
- key: string;
33
+ key: any;
34
34
  value: CacheResult;
35
35
  cacheHit: boolean;
36
36
  }>;
@@ -1,2 +1,2 @@
1
- export declare const version = "0.20.0";
1
+ export declare const version = "0.20.1-alpha-20260120163216-4904b133781b2233583b92129932903b1a0ef16f";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const version = "0.20.0";
1
+ export declare const version = "0.20.1-alpha-20260120163216-4904b133781b2233583b92129932903b1a0ef16f";
2
2
  //# sourceMappingURL=version.d.ts.map