@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/api-graphql",
|
|
3
|
-
"version": "4.0.1-console-preview.
|
|
3
|
+
"version": "4.0.1-console-preview.be08038.0+be08038",
|
|
4
4
|
"description": "Api-graphql category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -47,14 +47,13 @@
|
|
|
47
47
|
"internals"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@aws-amplify/api-rest": "4.0.1-console-preview.
|
|
51
|
-
"@aws-amplify/auth": "6.0.1-console-preview.
|
|
52
|
-
"@aws-amplify/core": "6.0.1-console-preview.
|
|
50
|
+
"@aws-amplify/api-rest": "4.0.1-console-preview.be08038.0+be08038",
|
|
51
|
+
"@aws-amplify/auth": "6.0.1-console-preview.be08038.0+be08038",
|
|
52
|
+
"@aws-amplify/core": "6.0.1-console-preview.be08038.0+be08038",
|
|
53
53
|
"@aws-sdk/types": "3.387.0",
|
|
54
54
|
"graphql": "15.8.0",
|
|
55
55
|
"rxjs": "^7.8.1",
|
|
56
|
-
"tslib": "^1.8.0"
|
|
57
|
-
"url": "0.11.0"
|
|
56
|
+
"tslib": "^1.8.0"
|
|
58
57
|
},
|
|
59
58
|
"size-limit": [
|
|
60
59
|
{
|
|
@@ -121,5 +120,5 @@
|
|
|
121
120
|
"<rootDir>/__tests__"
|
|
122
121
|
]
|
|
123
122
|
},
|
|
124
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "be08038c5b37a510243f077c6d3209e5383f8866"
|
|
125
124
|
}
|
package/src/GraphQLAPI.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { AmplifyClassV6 } from '@aws-amplify/core';
|
|
4
|
+
import { Category, ApiAction } from '@aws-amplify/core/internals/utils';
|
|
4
5
|
import { GraphQLOptions, GraphQLResult } from './types';
|
|
5
6
|
import { InternalGraphQLAPIClass } from './internals';
|
|
6
7
|
import { Observable } from 'rxjs';
|
|
@@ -35,7 +36,10 @@ export class GraphQLAPIClass extends InternalGraphQLAPIClass {
|
|
|
35
36
|
options: GraphQLOptions,
|
|
36
37
|
additionalHeaders?: { [key: string]: string }
|
|
37
38
|
): Observable<GraphQLResult<T>> | Promise<GraphQLResult<T>> {
|
|
38
|
-
return super.graphql(amplify, options, additionalHeaders
|
|
39
|
+
return super.graphql(amplify, options, additionalHeaders, {
|
|
40
|
+
category: Category.API,
|
|
41
|
+
action: ApiAction.GraphQl
|
|
42
|
+
});
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
/**
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { Observable, SubscriptionLike } from 'rxjs';
|
|
4
4
|
import { GraphQLError } from 'graphql';
|
|
5
|
-
import * as url from 'url';
|
|
6
5
|
import { Buffer } from 'buffer';
|
|
7
6
|
import { Hub, fetchAuthSession, ConsoleLogger } from '@aws-amplify/core';
|
|
8
7
|
import { signRequest } from '@aws-amplify/core/internals/aws-client-utils';
|
|
@@ -900,7 +899,9 @@ export class AWSAppSyncRealTimeProvider {
|
|
|
900
899
|
} else {
|
|
901
900
|
const handler = headerHandler[authenticationType];
|
|
902
901
|
|
|
903
|
-
const
|
|
902
|
+
const host = appSyncGraphqlEndpoint
|
|
903
|
+
? new AmplifyUrl(appSyncGraphqlEndpoint).host
|
|
904
|
+
: undefined;
|
|
904
905
|
|
|
905
906
|
logger.debug(`Authenticating with ${JSON.stringify(authenticationType)}`);
|
|
906
907
|
let resolvedApiKey;
|