@times-components/ssr 2.53.0 → 2.53.1

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": "@times-components/ssr",
3
3
  "main": "src",
4
- "version": "2.53.0",
4
+ "version": "2.53.1",
5
5
  "scripts": {
6
6
  "bundle:dev": "yarn cleanup-dist && webpack --config=webpack.config.js",
7
7
  "bundle:prod": "yarn cleanup-dist && NODE_ENV=production webpack --config=webpack.config.js -p",
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "3dfe74a846598ed50f71d8aae21f6f682783403f"
83
+ "gitHead": "b61c69bb69fa2019ab8346e16dd7235c36d53740"
84
84
  }
@@ -1,16 +1,20 @@
1
1
  const { onError } = require("apollo-link-error");
2
2
 
3
3
  const errorLink = logger =>
4
- onError(({ networkError, graphQLErrors }) => {
4
+ onError(({ operation, networkError, graphQLErrors }) => {
5
5
  let msg = "";
6
6
  if (graphQLErrors) {
7
7
  graphQLErrors.forEach(({ message }) => {
8
- msg = `[GraphQL error]: Message: ${message}`;
8
+ msg = `[GraphQL error]: Message: ${message}, Query: ${
9
+ operation.query
10
+ }, Variables: ${JSON.stringify(operation.variables)}`;
9
11
  logger.error(msg);
10
12
  });
11
13
  }
12
14
  if (networkError) {
13
- msg = `[GraphQL Network error]: ${networkError}`;
15
+ msg = `[GraphQL Network error]: ${networkError}, Query: ${
16
+ operation.query
17
+ }, Variables: ${JSON.stringify(operation.variables)}`;
14
18
  logger.error(msg);
15
19
  }
16
20
  });