@aws-amplify/api-graphql 4.0.1-console-preview.8d88eef.0 → 4.0.1-console-preview.be08038.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/GraphQLAPI.js +5 -1
- package/lib/Providers/AWSAppSyncRealTimeProvider/index.js +3 -2
- package/lib/tsconfig.tsbuildinfo +1341 -1280
- package/lib-esm/GraphQLAPI.js +5 -1
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js +3 -2
- package/lib-esm/tsconfig.tsbuildinfo +1341 -1280
- package/package.json +6 -7
- package/src/GraphQLAPI.ts +5 -1
- package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +3 -2
package/lib-esm/GraphQLAPI.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
|
+
import { Category, ApiAction } from '@aws-amplify/core/internals/utils';
|
|
2
3
|
import { InternalGraphQLAPIClass } from './internals';
|
|
3
4
|
export var graphqlOperation = function (query, variables, authToken) {
|
|
4
5
|
if (variables === void 0) { variables = {}; }
|
|
@@ -27,7 +28,10 @@ var GraphQLAPIClass = /** @class */ (function (_super) {
|
|
|
27
28
|
* @returns An Observable if the query is a subscription query, else a promise of the graphql result.
|
|
28
29
|
*/
|
|
29
30
|
GraphQLAPIClass.prototype.graphql = function (amplify, options, additionalHeaders) {
|
|
30
|
-
return _super.prototype.graphql.call(this, amplify, options, additionalHeaders
|
|
31
|
+
return _super.prototype.graphql.call(this, amplify, options, additionalHeaders, {
|
|
32
|
+
category: Category.API,
|
|
33
|
+
action: ApiAction.GraphQl
|
|
34
|
+
});
|
|
31
35
|
};
|
|
32
36
|
/**
|
|
33
37
|
* Checks to see if an error thrown is from an api request cancellation
|
|
@@ -3,7 +3,6 @@ import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { GraphQLError } from 'graphql';
|
|
6
|
-
import * as url from 'url';
|
|
7
6
|
import { Buffer } from 'buffer';
|
|
8
7
|
import { Hub, fetchAuthSession, ConsoleLogger } from '@aws-amplify/core';
|
|
9
8
|
import { signRequest } from '@aws-amplify/core/internals/aws-client-utils';
|
|
@@ -697,7 +696,9 @@ var AWSAppSyncRealTimeProvider = /** @class */ (function () {
|
|
|
697
696
|
return [2 /*return*/, undefined];
|
|
698
697
|
case 1:
|
|
699
698
|
handler = headerHandler[authenticationType];
|
|
700
|
-
host =
|
|
699
|
+
host = appSyncGraphqlEndpoint
|
|
700
|
+
? new AmplifyUrl(appSyncGraphqlEndpoint).host
|
|
701
|
+
: undefined;
|
|
701
702
|
logger.debug("Authenticating with " + JSON.stringify(authenticationType));
|
|
702
703
|
resolvedApiKey = void 0;
|
|
703
704
|
if (authenticationType === 'apiKey') {
|