Skip to content

Commit 5d275e9

Browse files
dguisingerDan Guisinger
andauthored
Fixed issues when using with Angular (#731)
Co-authored-by: Dan Guisinger <dguisinger@aegonam.com>
1 parent adf8856 commit 5d275e9

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

packages/aws-appsync-subscription-link/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"dependencies": {
2222
"aws-appsync-auth-link": "^3.0.7",
2323
"debug": "2.6.9",
24-
"url": "^0.11.0"
24+
"url": "^0.11.0",
25+
"zen-observable-ts": "^1.2.5"
2526
},
2627
"devDependencies": {
2728
"@apollo/client": "^3.2.0",

packages/aws-appsync-subscription-link/src/subscription-handshake-link.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
import { ApolloLink, Observable, Operation, FetchResult, ApolloError } from "@apollo/client/core";
6+
import * as ZenObservable from 'zen-observable-ts';
67

78
import { rootLogger } from "./utils";
89
import * as Paho from './vendor/paho-mqtt';
@@ -50,7 +51,7 @@ export class SubscriptionHandshakeLink extends ApolloLink {
5051
this.subsInfoContextKey = subsInfoContextKey;
5152
}
5253

53-
request(operation: Operation) {
54+
request(operation: Operation): Observable<FetchResult> | null {
5455
const {
5556
[this.subsInfoContextKey]: subsInfo,
5657
controlMessages: { [CONTROL_EVENTS_KEY]: controlEvents } = { [CONTROL_EVENTS_KEY]: undefined }

packages/aws-appsync-subscription-link/src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { AuthOptions } from "aws-appsync-auth-link";
2+
import * as ZenObservable from 'zen-observable-ts';
23

34
//#region Subscription link enums
45

0 commit comments

Comments
 (0)