@aws-amplify/api-graphql 4.0.1-console-preview.5a31ca1.0 → 4.0.1-console-preview.8d88eef.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 +1 -1
- package/lib/internals/InternalGraphQLAPI.js +2 -1
- package/lib/tsconfig.tsbuildinfo +195 -146
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js +3 -3
- package/lib-esm/internals/InternalGraphQLAPI.js +3 -2
- package/lib-esm/tsconfig.tsbuildinfo +195 -146
- package/package.json +5 -5
- package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +2 -3
- package/src/internals/InternalGraphQLAPI.ts +2 -3
|
@@ -5,14 +5,14 @@ import { Observable } from 'rxjs';
|
|
|
5
5
|
import { GraphQLError } from 'graphql';
|
|
6
6
|
import * as url from 'url';
|
|
7
7
|
import { Buffer } from 'buffer';
|
|
8
|
-
import { Hub, fetchAuthSession } from '@aws-amplify/core';
|
|
8
|
+
import { Hub, fetchAuthSession, ConsoleLogger } from '@aws-amplify/core';
|
|
9
9
|
import { signRequest } from '@aws-amplify/core/internals/aws-client-utils';
|
|
10
|
-
import {
|
|
10
|
+
import { NonRetryableError, USER_AGENT_HEADER, getAmplifyUserAgent, isNonRetryableError, jitteredExponentialRetry, amplifyUuid, AmplifyUrl, } from '@aws-amplify/core/internals/utils';
|
|
11
11
|
import { CONTROL_MSG, ConnectionState, } from '../../types/PubSub';
|
|
12
12
|
import { AMPLIFY_SYMBOL, AWS_APPSYNC_REALTIME_HEADERS, CONNECTION_INIT_TIMEOUT, DEFAULT_KEEP_ALIVE_TIMEOUT, DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT, MAX_DELAY_MS, MESSAGE_TYPES, NON_RETRYABLE_CODES, SOCKET_STATUS, START_ACK_TIMEOUT, SUBSCRIPTION_STATUS, CONNECTION_STATE_CHANGE, } from '../constants';
|
|
13
13
|
import { ConnectionStateMonitor, CONNECTION_CHANGE, } from '../../utils/ConnectionStateMonitor';
|
|
14
14
|
import { ReconnectEvent, ReconnectionMonitor, } from '../../utils/ReconnectionMonitor';
|
|
15
|
-
var logger = new
|
|
15
|
+
var logger = new ConsoleLogger('AWSAppSyncRealTimeProvider');
|
|
16
16
|
var dispatchApiEvent = function (payload) {
|
|
17
17
|
Hub.dispatch('api', payload, 'PubSub', AMPLIFY_SYMBOL);
|
|
18
18
|
};
|
|
@@ -2,14 +2,15 @@ import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import { print, parse, GraphQLError, } from 'graphql';
|
|
5
|
-
import { ConsoleLogger
|
|
5
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
6
|
+
import { getAmplifyUserAgent, AmplifyUrl, } from '@aws-amplify/core/internals/utils';
|
|
6
7
|
import { GraphQLAuthError, } from '../types';
|
|
7
8
|
import { isCancelError as isCancelErrorREST } from '@aws-amplify/api-rest';
|
|
8
9
|
import { post, cancel as cancelREST, updateRequestToBeCancellable, } from '@aws-amplify/api-rest/internals';
|
|
9
10
|
import { AWSAppSyncRealTimeProvider } from '../Providers/AWSAppSyncRealTimeProvider';
|
|
10
11
|
import { resolveConfig, resolveLibraryOptions } from '../utils';
|
|
11
12
|
var USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
12
|
-
var logger = new
|
|
13
|
+
var logger = new ConsoleLogger('GraphQLAPI');
|
|
13
14
|
export var graphqlOperation = function (query, variables, authToken) {
|
|
14
15
|
if (variables === void 0) { variables = {}; }
|
|
15
16
|
return ({
|