@graphql-yoga/plugin-apq 3.6.0 → 3.6.1-alpha-20240701184805-40467cd7

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
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAPQ = exports.createInMemoryAPQStore = exports.hashSHA256 = void 0;
3
+ exports.hashSHA256 = hashSHA256;
4
+ exports.createInMemoryAPQStore = createInMemoryAPQStore;
5
+ exports.useAPQ = useAPQ;
4
6
  const graphql_yoga_1 = require("graphql-yoga");
5
7
  async function hashSHA256(str, api = globalThis) {
6
8
  const { crypto, TextEncoder } = api;
@@ -13,14 +15,12 @@ async function hashSHA256(str, api = globalThis) {
13
15
  }
14
16
  return hashHex;
15
17
  }
16
- exports.hashSHA256 = hashSHA256;
17
18
  function createInMemoryAPQStore(options = {}) {
18
19
  return (0, graphql_yoga_1.createLRUCache)({
19
20
  max: options.max ?? 1000,
20
- ttl: options.ttl ?? 36000,
21
+ ttl: options.ttl ?? 36_000,
21
22
  });
22
23
  }
23
- exports.createInMemoryAPQStore = createInMemoryAPQStore;
24
24
  function isAPQExtension(input) {
25
25
  return (input != null &&
26
26
  typeof input === 'object' &&
@@ -77,4 +77,3 @@ function useAPQ(options = {}) {
77
77
  },
78
78
  };
79
79
  }
80
- exports.useAPQ = useAPQ;
package/esm/index.js CHANGED
@@ -13,7 +13,7 @@ export async function hashSHA256(str, api = globalThis) {
13
13
  export function createInMemoryAPQStore(options = {}) {
14
14
  return createLRUCache({
15
15
  max: options.max ?? 1000,
16
- ttl: options.ttl ?? 36000,
16
+ ttl: options.ttl ?? 36_000,
17
17
  });
18
18
  }
19
19
  function isAPQExtension(input) {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@graphql-yoga/plugin-apq",
3
- "version": "3.6.0",
3
+ "version": "3.6.1-alpha-20240701184805-40467cd7",
4
4
  "description": "APQ plugin for GraphQL Yoga.",
5
5
  "peerDependencies": {
6
6
  "@graphql-tools/utils": "^10.0.0",
7
- "graphql-yoga": "^5.6.0"
7
+ "graphql-yoga": "^5.6.1-alpha-20240701184805-40467cd7"
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",