@envelop/response-cache 3.0.1 → 4.0.0-alpha-ccec0fc.0

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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultGetDocumentString = exports.useCacheDocumentString = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const documentStringByDocument = new WeakMap();
6
6
  function useCacheDocumentString() {
7
7
  return {
package/cjs/plugin.js CHANGED
@@ -4,7 +4,7 @@ exports.useResponseCache = exports.defaultShouldCacheResult = exports.defaultBui
4
4
  const tslib_1 = require("tslib");
5
5
  const core_1 = require("@envelop/core");
6
6
  const utils_1 = require("@graphql-tools/utils");
7
- const graphql_1 = require("graphql");
7
+ const graphql_1 = require("@graphql-tools/graphql");
8
8
  const fast_json_stable_stringify_1 = tslib_1.__importDefault(require("fast-json-stable-stringify"));
9
9
  const in_memory_cache_js_1 = require("./in-memory-cache.js");
10
10
  const hash_sha256_js_1 = require("./hash-sha256.js");
@@ -1,4 +1,4 @@
1
- import { print } from 'graphql';
1
+ import { print } from '@graphql-tools/graphql';
2
2
  const documentStringByDocument = new WeakMap();
3
3
  export function useCacheDocumentString() {
4
4
  return {
package/esm/plugin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isAsyncIterable } from '@envelop/core';
2
2
  import { visitResult } from '@graphql-tools/utils';
3
- import { visit, TypeInfo, visitWithTypeInfo, getOperationAST, Kind, } from 'graphql';
3
+ import { visit, TypeInfo, visitWithTypeInfo, getOperationAST, Kind, } from '@graphql-tools/graphql';
4
4
  import jsonStableStringify from 'fast-json-stable-stringify';
5
5
  import { createInMemoryCache } from './in-memory-cache.js';
6
6
  import { hashSHA256 } from './hash-sha256.js';
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@envelop/response-cache",
3
- "version": "3.0.1",
3
+ "version": "4.0.0-alpha-ccec0fc.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@envelop/core": "^2.4.1",
7
- "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
6
+ "@envelop/core": "3.0.0-alpha-ccec0fc.0",
7
+ "@graphql-tools/graphql": "0.1.0-alpha-e7752ba5.0"
8
8
  },
9
9
  "dependencies": {
10
- "@graphql-tools/utils": "^8.8.0",
11
- "lru-cache": "^6.0.0",
12
- "fast-json-stable-stringify": "^2.1.0"
10
+ "@graphql-tools/utils": "8.9.1-alpha-e7752ba5.0",
11
+ "fast-json-stable-stringify": "^2.1.0",
12
+ "lru-cache": "^6.0.0"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
@@ -1,4 +1,4 @@
1
- import { ExecutionArgs } from 'graphql';
1
+ import { ExecutionArgs } from '@graphql-tools/graphql';
2
2
  import { Plugin } from '@envelop/core';
3
3
  export declare function useCacheDocumentString(): Plugin;
4
4
  export declare function defaultGetDocumentString(executionArgs: ExecutionArgs): string;
@@ -1,5 +1,5 @@
1
1
  import type { Maybe, PromiseOrValue } from '@envelop/core';
2
- import type { ExecutionResult } from 'graphql';
2
+ import type { ExecutionResult } from '@graphql-tools/graphql';
3
3
  export declare type CacheEntityRecord = {
4
4
  typename: string;
5
5
  id?: number | string;
@@ -1,5 +1,5 @@
1
1
  import { Plugin, Maybe } from '@envelop/core';
2
- import { ExecutionArgs, ExecutionResult } from 'graphql';
2
+ import { ExecutionArgs, ExecutionResult } from '@graphql-tools/graphql';
3
3
  import type { Cache } from './cache.js';
4
4
  /**
5
5
  * Function for building the response cache key based on the input parameters