@graphql-box/connection-resolver 5.4.12 → 5.4.14

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@graphql-box/connection-resolver",
3
3
  "description": "The GraphQL Box connection resolver module.",
4
- "version": "5.4.12",
4
+ "version": "5.4.14",
5
5
  "author": "Dylan Aubrey",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/badbatch/graphql-box",
@@ -1,6 +1,5 @@
1
1
  import { type Core } from '@cachemap/core';
2
2
  import { type PlainObject } from '@graphql-box/core';
3
- import { type Logger } from 'winston';
4
3
  import {
5
4
  type ConnectionInputOptions,
6
5
  type Getters,
@@ -21,7 +20,6 @@ export type Context<Resource extends PlainObject, ResourceNode extends Node> = {
21
20
  fieldPath: string;
22
21
  getters: Getters<Resource, ResourceNode>;
23
22
  groupCursor: string;
24
- logger: Logger | undefined;
25
23
  makeIDCursor: (id: string | number) => string;
26
24
  resourceResolver: ResourceResolver<Resource>;
27
25
  resultsPerPage: number;
@@ -35,7 +33,6 @@ export const resolveConnection = async <Resource extends PlainObject, ResourceNo
35
33
  fieldPath,
36
34
  getters,
37
35
  groupCursor,
38
- logger,
39
36
  makeIDCursor,
40
37
  resourceResolver,
41
38
  resultsPerPage,
@@ -52,10 +49,6 @@ export const resolveConnection = async <Resource extends PlainObject, ResourceNo
52
49
  if (missingPages.length === 0) {
53
50
  const edges = extractEdges(cachedEdges);
54
51
 
55
- logger?.info(`CACHE HIT: Connection resolver cache has data to resolve ${fieldPath}`, {
56
- logEntryName: 'RESOLVER_RESPONSE_FROM_CACHE',
57
- });
58
-
59
52
  return {
60
53
  edges,
61
54
  errors: [],
package/src/main/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type PlainObject } from '@graphql-box/core';
2
2
  import { type GraphQLResolveInfo } from 'graphql';
3
+ import crypto from 'node:crypto';
3
4
  import { isCursorSupplied } from '../helpers/isCursorSupplied.ts';
4
5
  import { requestAndCachePages } from '../helpers/requestAndCachePages.ts';
5
6
  import { resolveConnection } from '../helpers/resolveConnection.ts';
@@ -45,6 +46,7 @@ export const makeConnectionResolver =
45
46
  args,
46
47
  fieldPath,
47
48
  groupCursor,
49
+ resolverRequestId: crypto.randomUUID(),
48
50
  },
49
51
  };
50
52
 
@@ -83,7 +85,6 @@ export const makeConnectionResolver =
83
85
  fieldPath,
84
86
  getters,
85
87
  groupCursor,
86
- logger: childLogger,
87
88
  makeIDCursor,
88
89
  resourceResolver,
89
90
  resultsPerPage,
@@ -99,7 +100,6 @@ export const makeConnectionResolver =
99
100
  fieldPath,
100
101
  getters,
101
102
  groupCursor,
102
- logger: childLogger,
103
103
  makeIDCursor,
104
104
  resourceResolver,
105
105
  resultsPerPage,
@@ -124,7 +124,6 @@ export const makeConnectionResolver =
124
124
  fieldPath,
125
125
  getters,
126
126
  groupCursor,
127
- logger: childLogger,
128
127
  makeIDCursor,
129
128
  resourceResolver,
130
129
  resultsPerPage,