@trackunit/react-core-contexts 0.4.169 → 0.4.171

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.
Files changed (3) hide show
  1. package/index.cjs +5 -1
  2. package/index.js +5 -1
  3. package/package.json +7 -7
package/index.cjs CHANGED
@@ -81,8 +81,12 @@ const createApolloClient = ({ graphqlManagerUrl, graphqlPublicUrl, graphqlManage
81
81
  uri: request => graphqlReportUrl + "/" + request.operationName,
82
82
  });
83
83
  const authLink = context.setContext((_, { headers }) => __awaiter(void 0, void 0, void 0, function* () {
84
+ const newHeaders = Object.assign(Object.assign(Object.assign({}, headers), tracingHeaders), { Authorization: token ? `Bearer ${token}` : null });
85
+ if (isIrisApp) {
86
+ newHeaders["TU-IRIS-APP-ID"] = "this.irisAppId";
87
+ }
84
88
  return {
85
- headers: Object.assign(Object.assign(Object.assign({}, headers), tracingHeaders), { Authorization: token ? `Bearer ${token}` : null }),
89
+ headers: newHeaders,
86
90
  };
87
91
  }));
88
92
  const errorLink = error.onError((errorResponse) => {
package/index.js CHANGED
@@ -54,8 +54,12 @@ const createApolloClient = ({ graphqlManagerUrl, graphqlPublicUrl, graphqlManage
54
54
  uri: request => graphqlReportUrl + "/" + request.operationName,
55
55
  });
56
56
  const authLink = setContext((_, { headers }) => __awaiter(void 0, void 0, void 0, function* () {
57
+ const newHeaders = Object.assign(Object.assign(Object.assign({}, headers), tracingHeaders), { Authorization: token ? `Bearer ${token}` : null });
58
+ if (isIrisApp) {
59
+ newHeaders["TU-IRIS-APP-ID"] = "this.irisAppId";
60
+ }
57
61
  return {
58
- headers: Object.assign(Object.assign(Object.assign({}, headers), tracingHeaders), { Authorization: token ? `Bearer ${token}` : null }),
62
+ headers: newHeaders,
59
63
  };
60
64
  }));
61
65
  const errorLink = onError((errorResponse) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts",
3
- "version": "0.4.169",
3
+ "version": "0.4.171",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
@@ -8,12 +8,12 @@
8
8
  "@apollo/client": "3.7.10",
9
9
  "@js-temporal/polyfill": "0.4.3",
10
10
  "@sentry/browser": "7.50.0",
11
- "@trackunit/i18n-library-translation": "0.0.53",
12
- "@trackunit/iris-app-runtime-core": "0.3.47",
13
- "@trackunit/react-components": "0.1.101",
14
- "@trackunit/react-core-contexts-api": "0.2.37",
15
- "@trackunit/react-core-contexts-test": "0.1.71",
16
- "@trackunit/react-core-hooks": "0.2.61",
11
+ "@trackunit/i18n-library-translation": "0.0.54",
12
+ "@trackunit/iris-app-runtime-core": "0.3.48",
13
+ "@trackunit/react-components": "0.1.103",
14
+ "@trackunit/react-core-contexts-api": "0.2.38",
15
+ "@trackunit/react-core-contexts-test": "0.1.72",
16
+ "@trackunit/react-core-hooks": "0.2.62",
17
17
  "amplitude-js": "7.4.4",
18
18
  "apollo-upload-client": "17.0.0",
19
19
  "react": "18.2.0",