aws-appsync-subscription-link 3.1.0 → 3.1.2
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,25 @@
|
|
|
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.2"></a>
|
|
7
|
+
## [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)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* 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))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<a name="3.1.1"></a>
|
|
18
|
+
## [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)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
**Note:** Version bump only for package aws-appsync-subscription-link
|
|
24
|
+
|
|
6
25
|
<a name="3.1.0"></a>
|
|
7
26
|
# [3.1.0](https://github.com/awslabs/aws-mobile-appsync-sdk-js/compare/aws-appsync-subscription-link@3.0.11...aws-appsync-subscription-link@3.1.0) (2022-06-24)
|
|
8
27
|
|
|
@@ -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
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { ApolloLink, Observable, Operation, FetchResult } from "@apollo/client/core";
|
|
6
|
+
import * as ZenObservable from 'zen-observable-ts';
|
|
6
7
|
declare type MqttConnectionInfo = {
|
|
7
8
|
client: string;
|
|
8
9
|
url: string;
|
|
@@ -14,7 +15,7 @@ export declare class SubscriptionHandshakeLink extends ApolloLink {
|
|
|
14
15
|
private topicObservers;
|
|
15
16
|
private clientObservers;
|
|
16
17
|
constructor(subsInfoContextKey: any);
|
|
17
|
-
request(operation: Operation): Observable<
|
|
18
|
+
request(operation: Operation): Observable<FetchResult> | null;
|
|
18
19
|
connectNewClients(connectionInfo: MqttConnectionInfo[], observer: ZenObservable.Observer<FetchResult>, operation: Operation): Promise<any[]>;
|
|
19
20
|
connectNewClient(connectionInfo: MqttConnectionInfo, observer: ZenObservable.Observer<FetchResult>, selectionNames: string[]): Promise<any>;
|
|
20
21
|
subscribeToTopics<T>(client: any, topics: string[], observer: ZenObservable.Observer<T>): Promise<unknown[]>;
|
package/lib/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aws-appsync-subscription-link",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "AWS Mobile AppSync SDK for JavaScript",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"aws-appsync-auth-link": "^3.0.7",
|
|
23
23
|
"debug": "2.6.9",
|
|
24
|
-
"url": "^0.11.0"
|
|
24
|
+
"url": "^0.11.0",
|
|
25
|
+
"zen-observable-ts": "^1.2.5"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@apollo/client": "^3.2.0",
|