aws-appsync-subscription-link 3.1.1 → 3.1.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.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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
|
+
<a name="3.1.3"></a>
|
|
7
|
+
## [3.1.3](https://github.com/awslabs/aws-mobile-appsync-sdk-js/compare/aws-appsync-subscription-link@3.1.2...aws-appsync-subscription-link@3.1.3) (2024-01-23)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* exception due to illegal access to item in an empty map ([#747](https://github.com/awslabs/aws-mobile-appsync-sdk-js/issues/747)) ([82cb58e](https://github.com/awslabs/aws-mobile-appsync-sdk-js/commit/82cb58e))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<a name="3.1.2"></a>
|
|
18
|
+
## [3.1.2](https://github.com/awslabs/aws-mobile-appsync-sdk-js/compare/aws-appsync-subscription-link@3.1.1...aws-appsync-subscription-link@3.1.2) (2022-11-17)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* added check for observer ([#735](https://github.com/awslabs/aws-mobile-appsync-sdk-js/issues/735)) ([db8f9ae](https://github.com/awslabs/aws-mobile-appsync-sdk-js/commit/db8f9ae))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
<a name="3.1.1"></a>
|
|
7
29
|
## [3.1.1](https://github.com/awslabs/aws-mobile-appsync-sdk-js/compare/aws-appsync-subscription-link@3.1.0...aws-appsync-subscription-link@3.1.1) (2022-10-07)
|
|
8
30
|
|
|
@@ -339,7 +339,7 @@ var AppSyncRealTimeSubscriptionHandshakeLink = /** @class */ (function (_super)
|
|
|
339
339
|
}
|
|
340
340
|
return [2 /*return*/];
|
|
341
341
|
case 5:
|
|
342
|
-
_e = this.subscriptionObserverMap.get(subscriptionId), subscriptionFailedCallback = _e.subscriptionFailedCallback, subscriptionReadyCallback = _e.subscriptionReadyCallback;
|
|
342
|
+
_e = this.subscriptionObserverMap.get(subscriptionId) || {}, subscriptionFailedCallback = _e.subscriptionFailedCallback, subscriptionReadyCallback = _e.subscriptionReadyCallback;
|
|
343
343
|
// This must be done before sending the message in order to be listening immediately
|
|
344
344
|
this.subscriptionObserverMap.set(subscriptionId, {
|
|
345
345
|
observer: observer,
|
|
@@ -732,13 +732,18 @@ var AppSyncRealTimeSubscriptionHandshakeLink = /** @class */ (function (_super)
|
|
|
732
732
|
subscriptionFailedCallback: subscriptionFailedCallback,
|
|
733
733
|
subscriptionState: subscriptionState
|
|
734
734
|
});
|
|
735
|
-
observer.error({
|
|
736
|
-
errors: [
|
|
737
|
-
__assign({}, new graphql_1.GraphQLError("Connection failed: " + JSON.stringify(payload)))
|
|
738
|
-
]
|
|
739
|
-
});
|
|
740
735
|
clearTimeout(startAckTimeoutId);
|
|
741
|
-
observer
|
|
736
|
+
if (observer) {
|
|
737
|
+
observer.error({
|
|
738
|
+
errors: [
|
|
739
|
+
__assign({}, new graphql_1.GraphQLError("Connection failed: " + JSON.stringify(payload)))
|
|
740
|
+
]
|
|
741
|
+
});
|
|
742
|
+
observer.complete();
|
|
743
|
+
}
|
|
744
|
+
else {
|
|
745
|
+
logger("observer not found for id: " + id);
|
|
746
|
+
}
|
|
742
747
|
if (typeof subscriptionFailedCallback === "function") {
|
|
743
748
|
subscriptionFailedCallback();
|
|
744
749
|
}
|