@aws-amplify/api-graphql 4.0.1-console-preview.b278dcb.0 → 4.0.1-console-preview.3d7f188.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/internals/InternalGraphQLAPI.js +1 -1
- package/lib/tsconfig.tsbuildinfo +1284 -1283
- package/lib-esm/GraphQLAPI.js +5 -1
- package/lib-esm/internals/InternalGraphQLAPI.js +1 -1
- package/lib-esm/tsconfig.tsbuildinfo +1284 -1283
- package/package.json +5 -5
- package/src/GraphQLAPI.ts +5 -1
- package/src/internals/InternalGraphQLAPI.ts +1 -1
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.3d7f188.0+3d7f188",
|
|
4
4
|
"description": "Api-graphql category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -47,9 +47,9 @@
|
|
|
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.3d7f188.0+3d7f188",
|
|
51
|
+
"@aws-amplify/auth": "6.0.1-console-preview.3d7f188.0+3d7f188",
|
|
52
|
+
"@aws-amplify/core": "6.0.1-console-preview.3d7f188.0+3d7f188",
|
|
53
53
|
"@aws-sdk/types": "3.387.0",
|
|
54
54
|
"graphql": "15.8.0",
|
|
55
55
|
"rxjs": "^7.8.1",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"<rootDir>/__tests__"
|
|
121
121
|
]
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "3d7f18818c2f9e0790157aac2d0a0bfe90f21aff"
|
|
124
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
|
/**
|
|
@@ -321,7 +321,7 @@ export class InternalGraphQLAPIClass {
|
|
|
321
321
|
// If the exception is because user intentionally
|
|
322
322
|
// cancelled the request, do not modify the exception
|
|
323
323
|
// so that clients can identify the exception correctly.
|
|
324
|
-
if (this.
|
|
324
|
+
if (this.isCancelError(err)) {
|
|
325
325
|
throw err;
|
|
326
326
|
}
|
|
327
327
|
|