@aws-amplify/api-graphql 4.0.1-console-preview.67f944e.0 → 4.0.1-console-preview.0bbe168.0
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/lib/Providers/AWSAppSyncRealTimeProvider/index.d.ts +1 -1
- package/lib/Providers/AWSAppSyncRealTimeProvider/index.js +3 -3
- package/lib/tsconfig.tsbuildinfo +447 -221
- package/lib/types/PubSub.d.ts +2 -2
- package/lib/utils/ConnectionStateMonitor.d.ts +1 -1
- package/lib/utils/ConnectionStateMonitor.js +8 -7
- package/lib/utils/ReachabilityMonitor/index.d.ts +1 -3
- package/lib/utils/ReachabilityMonitor/index.native.d.ts +1 -3
- package/lib/utils/ReconnectionMonitor.d.ts +1 -1
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.d.ts +1 -1
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js +1 -1
- package/lib-esm/tsconfig.tsbuildinfo +447 -221
- package/lib-esm/types/PubSub.d.ts +2 -2
- package/lib-esm/utils/ConnectionStateMonitor.d.ts +1 -1
- package/lib-esm/utils/ConnectionStateMonitor.js +7 -6
- package/lib-esm/utils/ReachabilityMonitor/index.d.ts +1 -3
- package/lib-esm/utils/ReachabilityMonitor/index.native.d.ts +1 -3
- package/lib-esm/utils/ReconnectionMonitor.d.ts +1 -1
- package/package.json +6 -10
- package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +3 -3
- package/src/types/PubSub.ts +2 -4
- package/src/utils/ConnectionStateMonitor.ts +17 -13
- package/src/utils/ReconnectionMonitor.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Observable from '
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
2
|
import { PubSubContentObserver } from '../../types/PubSub';
|
|
3
3
|
import { SUBSCRIPTION_STATUS } from '../constants';
|
|
4
4
|
import { GraphQLAuthMode } from '@aws-amplify/core/lib-esm/singleton/API/types';
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
5
|
// SPDX-License-Identifier: Apache-2.0
|
|
6
|
-
var
|
|
6
|
+
var rxjs_1 = require("rxjs");
|
|
7
7
|
var graphql_1 = require("graphql");
|
|
8
8
|
var url = tslib_1.__importStar(require("url"));
|
|
9
9
|
var uuid_1 = require("uuid");
|
|
@@ -86,7 +86,7 @@ var AWSAppSyncRealTimeProvider = /** @class */ (function () {
|
|
|
86
86
|
AWSAppSyncRealTimeProvider.prototype.subscribe = function (options, customUserAgentDetails) {
|
|
87
87
|
var _this = this;
|
|
88
88
|
var appSyncGraphqlEndpoint = options.appSyncGraphqlEndpoint, region = options.region, query = options.query, variables = options.variables, authenticationType = options.authenticationType;
|
|
89
|
-
return new
|
|
89
|
+
return new rxjs_1.Observable(function (observer) {
|
|
90
90
|
if (!options || !appSyncGraphqlEndpoint) {
|
|
91
91
|
observer.error({
|
|
92
92
|
errors: [
|
|
@@ -123,7 +123,7 @@ var AWSAppSyncRealTimeProvider = /** @class */ (function () {
|
|
|
123
123
|
};
|
|
124
124
|
var reconnectSubscription_1;
|
|
125
125
|
// Add an observable to the reconnection list to manage reconnection for this subscription
|
|
126
|
-
reconnectSubscription_1 = new
|
|
126
|
+
reconnectSubscription_1 = new rxjs_1.Observable(function (observer) {
|
|
127
127
|
_this.reconnectionMonitor.addObserver(observer);
|
|
128
128
|
}).subscribe(function () {
|
|
129
129
|
startSubscription_1();
|