@aws-amplify/api-graphql 4.0.1-console-preview.8f82e46.0 → 4.0.1-console-preview.b278dcb.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.js +4 -3
- package/lib/internals/InternalGraphQLAPI.js +2 -1
- package/lib/tsconfig.tsbuildinfo +269 -160
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js +6 -5
- package/lib-esm/internals/InternalGraphQLAPI.js +3 -2
- package/lib-esm/tsconfig.tsbuildinfo +269 -160
- package/package.json +6 -7
- package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +5 -5
- package/src/internals/InternalGraphQLAPI.ts +2 -3
|
@@ -5,7 +5,6 @@ var tslib_1 = require("tslib");
|
|
|
5
5
|
// SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
var rxjs_1 = require("rxjs");
|
|
7
7
|
var graphql_1 = require("graphql");
|
|
8
|
-
var url = tslib_1.__importStar(require("url"));
|
|
9
8
|
var buffer_1 = require("buffer");
|
|
10
9
|
var core_1 = require("@aws-amplify/core");
|
|
11
10
|
var aws_client_utils_1 = require("@aws-amplify/core/internals/aws-client-utils");
|
|
@@ -14,7 +13,7 @@ var PubSub_1 = require("../../types/PubSub");
|
|
|
14
13
|
var constants_1 = require("../constants");
|
|
15
14
|
var ConnectionStateMonitor_1 = require("../../utils/ConnectionStateMonitor");
|
|
16
15
|
var ReconnectionMonitor_1 = require("../../utils/ReconnectionMonitor");
|
|
17
|
-
var logger = new
|
|
16
|
+
var logger = new core_1.ConsoleLogger('AWSAppSyncRealTimeProvider');
|
|
18
17
|
var dispatchApiEvent = function (payload) {
|
|
19
18
|
core_1.Hub.dispatch('api', payload, 'PubSub', constants_1.AMPLIFY_SYMBOL);
|
|
20
19
|
};
|
|
@@ -699,7 +698,9 @@ var AWSAppSyncRealTimeProvider = /** @class */ (function () {
|
|
|
699
698
|
return [2 /*return*/, undefined];
|
|
700
699
|
case 1:
|
|
701
700
|
handler = headerHandler[authenticationType];
|
|
702
|
-
host =
|
|
701
|
+
host = appSyncGraphqlEndpoint
|
|
702
|
+
? new utils_1.AmplifyUrl(appSyncGraphqlEndpoint).host
|
|
703
|
+
: undefined;
|
|
703
704
|
logger.debug("Authenticating with " + JSON.stringify(authenticationType));
|
|
704
705
|
resolvedApiKey = void 0;
|
|
705
706
|
if (authenticationType === 'apiKey') {
|
|
@@ -4,6 +4,7 @@ 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
6
|
var graphql_1 = require("graphql");
|
|
7
|
+
var core_1 = require("@aws-amplify/core");
|
|
7
8
|
var utils_1 = require("@aws-amplify/core/internals/utils");
|
|
8
9
|
var types_1 = require("../types");
|
|
9
10
|
var api_rest_1 = require("@aws-amplify/api-rest");
|
|
@@ -11,7 +12,7 @@ var internals_1 = require("@aws-amplify/api-rest/internals");
|
|
|
11
12
|
var AWSAppSyncRealTimeProvider_1 = require("../Providers/AWSAppSyncRealTimeProvider");
|
|
12
13
|
var utils_2 = require("../utils");
|
|
13
14
|
var USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
14
|
-
var logger = new
|
|
15
|
+
var logger = new core_1.ConsoleLogger('GraphQLAPI');
|
|
15
16
|
exports.graphqlOperation = function (query, variables, authToken) {
|
|
16
17
|
if (variables === void 0) { variables = {}; }
|
|
17
18
|
return ({
|