@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/lib-esm/GraphQLAPI.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
|
+
import { Category, ApiAction } from '@aws-amplify/core/internals/utils';
|
|
2
3
|
import { InternalGraphQLAPIClass } from './internals';
|
|
3
4
|
export var graphqlOperation = function (query, variables, authToken) {
|
|
4
5
|
if (variables === void 0) { variables = {}; }
|
|
@@ -27,7 +28,10 @@ var GraphQLAPIClass = /** @class */ (function (_super) {
|
|
|
27
28
|
* @returns An Observable if the query is a subscription query, else a promise of the graphql result.
|
|
28
29
|
*/
|
|
29
30
|
GraphQLAPIClass.prototype.graphql = function (amplify, options, additionalHeaders) {
|
|
30
|
-
return _super.prototype.graphql.call(this, amplify, options, additionalHeaders
|
|
31
|
+
return _super.prototype.graphql.call(this, amplify, options, additionalHeaders, {
|
|
32
|
+
category: Category.API,
|
|
33
|
+
action: ApiAction.GraphQl
|
|
34
|
+
});
|
|
31
35
|
};
|
|
32
36
|
/**
|
|
33
37
|
* Checks to see if an error thrown is from an api request cancellation
|
|
@@ -257,7 +257,7 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
|
|
|
257
257
|
// If the exception is because user intentionally
|
|
258
258
|
// cancelled the request, do not modify the exception
|
|
259
259
|
// so that clients can identify the exception correctly.
|
|
260
|
-
if (this.
|
|
260
|
+
if (this.isCancelError(err_1)) {
|
|
261
261
|
throw err_1;
|
|
262
262
|
}
|
|
263
263
|
response = {
|