@aws-amplify/api-graphql 2.3.4-unstable.2 → 2.3.4-unstable.3

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.
@@ -9824,6 +9824,16 @@ function () {
9824
9824
  RestAPIClass.prototype.cancel = function (request, message) {
9825
9825
  return this._api.cancel(request, message);
9826
9826
  };
9827
+ /**
9828
+ * Check if the request has a corresponding cancel token in the WeakMap.
9829
+ * @params request - The request promise
9830
+ * @return if the request has a corresponding cancel token.
9831
+ */
9832
+
9833
+
9834
+ RestAPIClass.prototype.hasCancelToken = function (request) {
9835
+ return this._api.hasCancelToken(request);
9836
+ };
9827
9837
  /**
9828
9838
  * Getting endpoint for API
9829
9839
  * @param {string} apiName - The name of the api
@@ -10389,9 +10399,20 @@ function () {
10389
10399
 
10390
10400
  if (source) {
10391
10401
  source.cancel(message);
10402
+ return true;
10392
10403
  }
10393
10404
 
10394
- return true;
10405
+ return false;
10406
+ };
10407
+ /**
10408
+ * Check if the request has a corresponding cancel token in the WeakMap.
10409
+ * @params request - The request promise
10410
+ * @return if the request has a corresponding cancel token.
10411
+ */
10412
+
10413
+
10414
+ RestClient.prototype.hasCancelToken = function (request) {
10415
+ return this._cancelTokenMap.has(request);
10395
10416
  };
10396
10417
  /**
10397
10418
  * Checks to see if an error thrown is from an api request cancellation
@@ -14874,6 +14895,16 @@ function () {
14874
14895
  GraphQLAPIClass.prototype.cancel = function (request, message) {
14875
14896
  return this._api.cancel(request, message);
14876
14897
  };
14898
+ /**
14899
+ * Check if the request has a corresponding cancel token in the WeakMap.
14900
+ * @params request - The request promise
14901
+ * @return if the request has a corresponding cancel token.
14902
+ */
14903
+
14904
+
14905
+ GraphQLAPIClass.prototype.hasCancelToken = function (request) {
14906
+ return this._api.hasCancelToken(request);
14907
+ };
14877
14908
 
14878
14909
  GraphQLAPIClass.prototype._graphqlSubscribe = function (_a, additionalHeaders) {
14879
14910
  var query = _a.query,