@tmdb-graphql-api/resolvers 0.1.2-unstable.6 → 0.1.2-unstable.7

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": "@tmdb-graphql-api/resolvers",
3
3
  "description": "The TMDB GraphQL resolvers module.",
4
- "version": "0.1.2-unstable.6",
4
+ "version": "0.1.2-unstable.7",
5
5
  "author": "Dylan Aubrey",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/badbatch/themoviedb-graphql-api",
@@ -25,8 +25,8 @@ export const buildArgsResolver =
25
25
 
26
26
  const childLogger = logger.child(newCtx.data);
27
27
 
28
- childLogger.info(`Resolving ${fieldName}`);
29
- const { data, errors, headers, source = 'api' } = await callback(args, newCtx, info);
28
+ childLogger.info(`Resolving ${fieldName} ${JSON.stringify(args)}`);
29
+ const { data, errors, headers } = await callback(args, newCtx, info);
30
30
 
31
31
  if (errors?.length) {
32
32
  const message = `Failed to resolve ${fieldName}`;
@@ -34,7 +34,6 @@ export const buildArgsResolver =
34
34
  throw new GraphQLError(message, { nodes: fieldNodes, originalError: errors[0] });
35
35
  }
36
36
 
37
- childLogger.info(`Successfully resolved ${fieldName} from ${source}`);
38
37
  setCacheMetadata(fieldName, headers);
39
38
  return data;
40
39
  };
@@ -32,7 +32,6 @@ export const buildNoObjArgsResolver =
32
32
  throw new GraphQLError(message, { nodes: fieldNodes, originalError: errors[0] });
33
33
  }
34
34
 
35
- childLogger.info(`Successfully resolved ${fieldPath} from api`);
36
35
  setCacheMetadata(fieldPath, headers);
37
36
  return data;
38
37
  };
@@ -38,7 +38,7 @@ export const buildObjArgsResolver =
38
38
  childLogger.info(enrichLogMessage('Resolving'));
39
39
  }
40
40
 
41
- const { data, errors, headers, source = 'api' } = await callback(obj, args, newCtx, info);
41
+ const { data, errors, headers } = await callback(obj, args, newCtx, info);
42
42
 
43
43
  if (errors?.length) {
44
44
  const message = enrichLogMessage('Failed to resolve');
@@ -50,10 +50,6 @@ export const buildObjArgsResolver =
50
50
  throw new GraphQLError(message, { nodes: fieldNodes, originalError: errors[0] });
51
51
  }
52
52
 
53
- if (loggingEnabled) {
54
- childLogger.info(enrichLogMessage(`Successfully resolved from ${source}`));
55
- }
56
-
57
53
  if (headers) {
58
54
  setCacheMetadata(fieldPath, headers);
59
55
  }
@@ -33,7 +33,7 @@ export const buildObjResolver =
33
33
  }
34
34
 
35
35
  childLogger.info(`Resolving ${fieldPath}`);
36
- const { data, errors, headers, source = 'api' } = await callback(obj, newCtx, info);
36
+ const { data, errors, headers } = await callback(obj, newCtx, info);
37
37
 
38
38
  if (errors?.length) {
39
39
  const message = `Failed to resolve ${fieldPath}`;
@@ -41,8 +41,6 @@ export const buildObjResolver =
41
41
  throw new GraphQLError(message, { nodes: fieldNodes, originalError: errors[0] });
42
42
  }
43
43
 
44
- childLogger.info(`Successfully resolved ${fieldPath} from ${source}`);
45
-
46
44
  if (headers) {
47
45
  setCacheMetadata(fieldPath, headers);
48
46
  }