@aws-amplify/api-graphql 4.0.1-api-v6-models.8035dfc.0 → 4.0.1-api-v6-models.572a7b5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/api-graphql",
3
- "version": "4.0.1-api-v6-models.8035dfc.0+8035dfc",
3
+ "version": "4.0.1-api-v6-models.572a7b5.0+572a7b5",
4
4
  "description": "Api-graphql category of aws-amplify",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",
@@ -52,15 +52,14 @@
52
52
  ],
53
53
  "dependencies": {
54
54
  "@aws-amplify/amplify-api-next-types-alpha": "^0.2.0",
55
- "@aws-amplify/api-rest": "4.0.1-api-v6-models.8035dfc.0+8035dfc",
56
- "@aws-amplify/auth": "6.0.1-api-v6-models.8035dfc.0+8035dfc",
57
- "@aws-amplify/core": "6.0.1-api-v6-models.8035dfc.0+8035dfc",
55
+ "@aws-amplify/api-rest": "4.0.1-api-v6-models.572a7b5.0+572a7b5",
56
+ "@aws-amplify/auth": "6.0.1-api-v6-models.572a7b5.0+572a7b5",
57
+ "@aws-amplify/core": "6.0.1-api-v6-models.572a7b5.0+572a7b5",
58
58
  "@aws-sdk/types": "3.387.0",
59
59
  "graphql": "15.8.0",
60
60
  "rxjs": "^7.8.1",
61
61
  "tslib": "^2.6.1",
62
- "url": "0.11.0",
63
- "uuid": "^3.2.1"
62
+ "url": "0.11.0"
64
63
  },
65
64
  "size-limit": [
66
65
  {
@@ -127,5 +126,5 @@
127
126
  "<rootDir>/__tests__"
128
127
  ]
129
128
  },
130
- "gitHead": "8035dfc20dda8f7b4d116616e89e72d889ceb5f1"
129
+ "gitHead": "572a7b56d9e87ca779038254de3d68b5c607af07"
131
130
  }
@@ -3,20 +3,20 @@
3
3
  import { Observable, SubscriptionLike } from 'rxjs';
4
4
  import { GraphQLError } from 'graphql';
5
5
  import * as url from 'url';
6
- import { v4 as uuid } from 'uuid';
7
6
  import { Buffer } from 'buffer';
8
- import { Hub, fetchAuthSession } from '@aws-amplify/core';
7
+ import { Hub, fetchAuthSession, ConsoleLogger } from '@aws-amplify/core';
9
8
  import { signRequest } from '@aws-amplify/core/internals/aws-client-utils';
10
9
  import {
11
10
  GraphQLAuthMode,
12
11
  CustomUserAgentDetails,
13
- Logger,
14
12
  NonRetryableError,
15
13
  USER_AGENT_HEADER,
16
14
  getAmplifyUserAgent,
17
15
  isNonRetryableError,
18
16
  jitteredExponentialRetry,
19
17
  DocumentType,
18
+ amplifyUuid,
19
+ AmplifyUrl,
20
20
  } from '@aws-amplify/core/internals/utils';
21
21
 
22
22
  import {
@@ -47,7 +47,7 @@ import {
47
47
  ReconnectionMonitor,
48
48
  } from '../../utils/ReconnectionMonitor';
49
49
 
50
- const logger = new Logger('AWSAppSyncRealTimeProvider');
50
+ const logger = new ConsoleLogger('AWSAppSyncRealTimeProvider');
51
51
 
52
52
  const dispatchApiEvent = payload => {
53
53
  Hub.dispatch('api', payload, 'PubSub', AMPLIFY_SYMBOL);
@@ -210,7 +210,7 @@ export class AWSAppSyncRealTimeProvider {
210
210
  observer.complete();
211
211
  } else {
212
212
  let subscriptionStartActive = false;
213
- const subscriptionId = uuid();
213
+ const subscriptionId = amplifyUuid();
214
214
  const startSubscription = () => {
215
215
  if (!subscriptionStartActive) {
216
216
  subscriptionStartActive = true;
@@ -968,7 +968,7 @@ export class AWSAppSyncRealTimeProvider {
968
968
  {
969
969
  headers: request.headers,
970
970
  method: request.method,
971
- url: new URL(request.url),
971
+ url: new AmplifyUrl(request.url),
972
972
  body: request.data,
973
973
  },
974
974
  {
@@ -9,12 +9,12 @@ 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,
17
+ AmplifyUrl,
18
18
  } from '@aws-amplify/core/internals/utils';
19
19
  import {
20
20
  GraphQLAuthError,
@@ -33,7 +33,7 @@ import { resolveConfig, resolveLibraryOptions } from '../utils';
33
33
 
34
34
  const USER_AGENT_HEADER = 'x-amz-user-agent';
35
35
 
36
- const logger = new Logger('GraphQLAPI');
36
+ const logger = new ConsoleLogger('GraphQLAPI');
37
37
 
38
38
  export const graphqlOperation = (
39
39
  query,
@@ -304,7 +304,7 @@ export class InternalGraphQLAPIClass {
304
304
  let response;
305
305
  try {
306
306
  const { body: responseBody } = await this._api.post({
307
- url: new URL(endpoint),
307
+ url: new AmplifyUrl(endpoint),
308
308
  options: {
309
309
  headers,
310
310
  body,