@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
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.b278dcb.0+b278dcb",
|
|
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.b278dcb.0+b278dcb",
|
|
51
|
+
"@aws-amplify/auth": "6.0.1-console-preview.b278dcb.0+b278dcb",
|
|
52
|
+
"@aws-amplify/core": "6.0.1-console-preview.b278dcb.0+b278dcb",
|
|
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": "b278dcb6dd7334e53d92d22386a22fba3c4a6089"
|
|
125
124
|
}
|
|
@@ -2,14 +2,12 @@
|
|
|
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
|
-
import { Hub, fetchAuthSession } from '@aws-amplify/core';
|
|
6
|
+
import { Hub, fetchAuthSession, ConsoleLogger } from '@aws-amplify/core';
|
|
8
7
|
import { signRequest } from '@aws-amplify/core/internals/aws-client-utils';
|
|
9
8
|
import {
|
|
10
9
|
GraphQLAuthMode,
|
|
11
10
|
CustomUserAgentDetails,
|
|
12
|
-
Logger,
|
|
13
11
|
NonRetryableError,
|
|
14
12
|
USER_AGENT_HEADER,
|
|
15
13
|
getAmplifyUserAgent,
|
|
@@ -48,7 +46,7 @@ import {
|
|
|
48
46
|
ReconnectionMonitor,
|
|
49
47
|
} from '../../utils/ReconnectionMonitor';
|
|
50
48
|
|
|
51
|
-
const logger = new
|
|
49
|
+
const logger = new ConsoleLogger('AWSAppSyncRealTimeProvider');
|
|
52
50
|
|
|
53
51
|
const dispatchApiEvent = payload => {
|
|
54
52
|
Hub.dispatch('api', payload, 'PubSub', AMPLIFY_SYMBOL);
|
|
@@ -901,7 +899,9 @@ export class AWSAppSyncRealTimeProvider {
|
|
|
901
899
|
} else {
|
|
902
900
|
const handler = headerHandler[authenticationType];
|
|
903
901
|
|
|
904
|
-
const
|
|
902
|
+
const host = appSyncGraphqlEndpoint
|
|
903
|
+
? new AmplifyUrl(appSyncGraphqlEndpoint).host
|
|
904
|
+
: undefined;
|
|
905
905
|
|
|
906
906
|
logger.debug(`Authenticating with ${JSON.stringify(authenticationType)}`);
|
|
907
907
|
let resolvedApiKey;
|
|
@@ -9,11 +9,10 @@ import {
|
|
|
9
9
|
OperationTypeNode,
|
|
10
10
|
} from 'graphql';
|
|
11
11
|
import { Observable } from 'rxjs';
|
|
12
|
-
import { AmplifyClassV6 } from '@aws-amplify/core';
|
|
12
|
+
import { AmplifyClassV6, ConsoleLogger } from '@aws-amplify/core';
|
|
13
13
|
import {
|
|
14
14
|
GraphQLAuthMode,
|
|
15
15
|
CustomUserAgentDetails,
|
|
16
|
-
ConsoleLogger as Logger,
|
|
17
16
|
getAmplifyUserAgent,
|
|
18
17
|
AmplifyUrl,
|
|
19
18
|
} from '@aws-amplify/core/internals/utils';
|
|
@@ -34,7 +33,7 @@ import { resolveConfig, resolveLibraryOptions } from '../utils';
|
|
|
34
33
|
|
|
35
34
|
const USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
36
35
|
|
|
37
|
-
const logger = new
|
|
36
|
+
const logger = new ConsoleLogger('GraphQLAPI');
|
|
38
37
|
|
|
39
38
|
export const graphqlOperation = (
|
|
40
39
|
query,
|