@aws-amplify/api 4.0.45-unstable.7 → 4.0.46-unstable.5

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.0.45](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api@4.0.44...@aws-amplify/api@4.0.45) (2022-07-07)
7
+
8
+ **Note:** Version bump only for package @aws-amplify/api
9
+
10
+
11
+
12
+
13
+
6
14
  ## [4.0.44](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api@4.0.43...@aws-amplify/api@4.0.44) (2022-06-18)
7
15
 
8
16
  **Note:** Version bump only for package @aws-amplify/api
@@ -9686,7 +9686,7 @@ var __read = undefined && undefined.__read || function (o, n) {
9686
9686
 
9687
9687
  var USER_AGENT_HEADER = 'x-amz-user-agent';
9688
9688
  var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('GraphQLAPI');
9689
- var graphqlOperation = function graphqlOperation(query, variables, authToken) {
9689
+ var graphqlOperation = function graphqlOperation(query, variables, authToken, userAgentSuffix) {
9690
9690
  if (variables === void 0) {
9691
9691
  variables = {};
9692
9692
  }
@@ -9694,7 +9694,8 @@ var graphqlOperation = function graphqlOperation(query, variables, authToken) {
9694
9694
  return {
9695
9695
  query: query,
9696
9696
  variables: variables,
9697
- authToken: authToken
9697
+ authToken: authToken,
9698
+ userAgentSuffix: userAgentSuffix
9698
9699
  };
9699
9700
  };
9700
9701
  /**
@@ -9985,7 +9986,8 @@ function () {
9985
9986
  _b = _a.variables,
9986
9987
  variables = _b === void 0 ? {} : _b,
9987
9988
  authMode = _a.authMode,
9988
- authToken = _a.authToken;
9989
+ authToken = _a.authToken,
9990
+ userAgentSuffix = _a.userAgentSuffix;
9989
9991
  var query = typeof paramQuery === 'string' ? Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(paramQuery) : Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(Object(graphql__WEBPACK_IMPORTED_MODULE_0__["print"])(paramQuery));
9990
9992
 
9991
9993
  var _c = __read(query.definitions.filter(function (def) {
@@ -10013,7 +10015,8 @@ function () {
10013
10015
  var responsePromise = this._graphql({
10014
10016
  query: query,
10015
10017
  variables: variables,
10016
- authMode: authMode
10018
+ authMode: authMode,
10019
+ userAgentSuffix: userAgentSuffix
10017
10020
  }, headers, initParams);
10018
10021
 
10019
10022
  this._api.updateRequestToBeCancellable(responsePromise, cancellableToken);
@@ -10035,7 +10038,8 @@ function () {
10035
10038
  GraphQLAPIClass.prototype._graphql = function (_a, additionalHeaders, initParams) {
10036
10039
  var query = _a.query,
10037
10040
  variables = _a.variables,
10038
- authMode = _a.authMode;
10041
+ authMode = _a.authMode,
10042
+ userAgentSuffix = _a.userAgentSuffix;
10039
10043
 
10040
10044
  if (additionalHeaders === void 0) {
10041
10045
  additionalHeaders = {};
@@ -10121,7 +10125,7 @@ function () {
10121
10125
  })];
10122
10126
 
10123
10127
  case 9:
10124
- headers = __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _j.concat([_l.sent()])), additionalHeaders]), !customGraphqlEndpoint && (_k = {}, _k[USER_AGENT_HEADER] = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Constants"].userAgent, _k)]);
10128
+ headers = __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _j.concat([_l.sent()])), additionalHeaders]), !customGraphqlEndpoint && (_k = {}, _k[USER_AGENT_HEADER] = Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])(userAgentSuffix), _k)]);
10125
10129
  body = {
10126
10130
  query: Object(graphql__WEBPACK_IMPORTED_MODULE_0__["print"])(query),
10127
10131
  variables: variables