@graphql-box/connection-resolver 5.4.10 → 5.4.12

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.10",
4
+ "version": "5.4.12",
5
5
  "author": "Dylan Aubrey",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/badbatch/graphql-box",
@@ -38,7 +38,7 @@
38
38
  "js-base64": "^3.7.7",
39
39
  "lodash-es": "^4.17.21",
40
40
  "type-fest": "^4.30.0",
41
- "@graphql-box/core": "5.4.4"
41
+ "@graphql-box/core": "5.4.5"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "graphql": "<17",
@@ -51,7 +51,10 @@ export const resolveConnection = async <Resource extends PlainObject, ResourceNo
51
51
 
52
52
  if (missingPages.length === 0) {
53
53
  const edges = extractEdges(cachedEdges);
54
- logger?.info(`Successfully resolved ${fieldPath} from cache`);
54
+
55
+ logger?.info(`CACHE HIT: Connection resolver cache has data to resolve ${fieldPath}`, {
56
+ logEntryName: 'RESOLVER_RESPONSE_FROM_CACHE',
57
+ });
55
58
 
56
59
  return {
57
60
  edges,
@@ -84,7 +87,6 @@ export const resolveConnection = async <Resource extends PlainObject, ResourceNo
84
87
  });
85
88
 
86
89
  const edges = extractEdges(mergedCachedEdges);
87
- logger?.info(`Successfully resolved ${fieldPath} from api`);
88
90
 
89
91
  return {
90
92
  edges,
package/src/main/index.ts CHANGED
@@ -50,7 +50,7 @@ export const makeConnectionResolver =
50
50
 
51
51
  const resourceResolver = createResourceResolver(source, args, newCtx, info);
52
52
  const childLogger = logger?.child(newCtx.data);
53
- childLogger?.info(`Resolving ${fieldPath}`);
53
+ childLogger?.info(`Resolving ${fieldPath}`, { logEntryName: 'RESOLVER_START' });
54
54
 
55
55
  if (isCursorSupplied(args)) {
56
56
  const cursorError = await validateCursor(args, info, {
@@ -62,6 +62,7 @@ export const makeConnectionResolver =
62
62
  if (cursorError) {
63
63
  childLogger?.error(`Failed to resolve ${fieldPath}, validation cursor error`, {
64
64
  errors: [cursorError],
65
+ logEntryName: 'RESOLVER_FAILED',
65
66
  });
66
67
 
67
68
  return resolver({