@aws-amplify/api-graphql 4.0.1-mjs-test.6f5dab7.0 → 4.0.1-mjs-test.fc9412c.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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.GraphQLAPI = exports.GraphQLAPIClass = exports.graphqlOperation = void 0;
5
5
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
- const internals_1 = require("./internals");
6
+ const InternalGraphQLAPI_1 = require("./internals/InternalGraphQLAPI");
7
7
  const graphqlOperation = (query, variables = {}, authToken) => ({
8
8
  query,
9
9
  variables,
@@ -13,7 +13,7 @@ exports.graphqlOperation = graphqlOperation;
13
13
  /**
14
14
  * Export Cloud Logic APIs
15
15
  */
16
- class GraphQLAPIClass extends internals_1.InternalGraphQLAPIClass {
16
+ class GraphQLAPIClass extends InternalGraphQLAPI_1.InternalGraphQLAPIClass {
17
17
  getModuleName() {
18
18
  return 'GraphQLAPI';
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GraphQLAPI.js","sources":["../../src/GraphQLAPI.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GraphQLAPI = exports.GraphQLAPIClass = exports.graphqlOperation = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst internals_1 = require(\"./internals\");\nconst graphqlOperation = (query, variables = {}, authToken) => ({\n query,\n variables,\n authToken,\n});\nexports.graphqlOperation = graphqlOperation;\n/**\n * Export Cloud Logic APIs\n */\nclass GraphQLAPIClass extends internals_1.InternalGraphQLAPIClass {\n getModuleName() {\n return 'GraphQLAPI';\n }\n /**\n * Executes a GraphQL operation\n *\n * @param options - GraphQL Options\n * @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config\n * @returns An Observable if the query is a subscription query, else a promise of the graphql result.\n */\n graphql(amplify, options, additionalHeaders) {\n return super.graphql(amplify, options, additionalHeaders, {\n category: utils_1.Category.API,\n action: utils_1.ApiAction.GraphQl,\n });\n }\n /**\n * Checks to see if an error thrown is from an api request cancellation\n * @param error - Any error\n * @returns A boolean indicating if the error was from an api request cancellation\n */\n isCancelError(error) {\n return super.isCancelError(error);\n }\n /**\n * Cancels an inflight request. Only applicable for graphql queries and mutations\n * @param {any} request - request to cancel\n * @returns A boolean indicating if the request was cancelled\n */\n cancel(request, message) {\n return super.cancel(request, message);\n }\n}\nexports.GraphQLAPIClass = GraphQLAPIClass;\nexports.GraphQLAPI = new GraphQLAPIClass(null);\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AACjF,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAC3C,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,SAAS,MAAM;AAChE,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,SAAS;AACb,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AAC5C;AACA;AACA;AACA,MAAM,eAAe,SAAS,WAAW,CAAC,uBAAuB,CAAC;AAClE,IAAI,aAAa,GAAG;AACpB,QAAQ,OAAO,YAAY,CAAC;AAC5B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;AACjD,QAAQ,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;AAClE,YAAY,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG;AAC1C,YAAY,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO;AAC7C,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,CAAC,KAAK,EAAE;AACzB,QAAQ,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC1C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE;AAC7B,QAAQ,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC9C,KAAK;AACL,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,eAAe,CAAC;AAC1C,OAAO,CAAC,UAAU,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC;;"}
1
+ {"version":3,"file":"GraphQLAPI.js","sources":["../../src/GraphQLAPI.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GraphQLAPI = exports.GraphQLAPIClass = exports.graphqlOperation = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst InternalGraphQLAPI_1 = require(\"./internals/InternalGraphQLAPI\");\nconst graphqlOperation = (query, variables = {}, authToken) => ({\n query,\n variables,\n authToken,\n});\nexports.graphqlOperation = graphqlOperation;\n/**\n * Export Cloud Logic APIs\n */\nclass GraphQLAPIClass extends InternalGraphQLAPI_1.InternalGraphQLAPIClass {\n getModuleName() {\n return 'GraphQLAPI';\n }\n /**\n * Executes a GraphQL operation\n *\n * @param options - GraphQL Options\n * @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config\n * @returns An Observable if the query is a subscription query, else a promise of the graphql result.\n */\n graphql(amplify, options, additionalHeaders) {\n return super.graphql(amplify, options, additionalHeaders, {\n category: utils_1.Category.API,\n action: utils_1.ApiAction.GraphQl,\n });\n }\n /**\n * Checks to see if an error thrown is from an api request cancellation\n * @param error - Any error\n * @returns A boolean indicating if the error was from an api request cancellation\n */\n isCancelError(error) {\n return super.isCancelError(error);\n }\n /**\n * Cancels an inflight request. Only applicable for graphql queries and mutations\n * @param {any} request - request to cancel\n * @returns A boolean indicating if the request was cancelled\n */\n cancel(request, message) {\n return super.cancel(request, message);\n }\n}\nexports.GraphQLAPIClass = GraphQLAPIClass;\nexports.GraphQLAPI = new GraphQLAPIClass(null);\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AACjF,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,oBAAoB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AACvE,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,SAAS,MAAM;AAChE,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,SAAS;AACb,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AAC5C;AACA;AACA;AACA,MAAM,eAAe,SAAS,oBAAoB,CAAC,uBAAuB,CAAC;AAC3E,IAAI,aAAa,GAAG;AACpB,QAAQ,OAAO,YAAY,CAAC;AAC5B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;AACjD,QAAQ,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;AAClE,YAAY,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG;AAC1C,YAAY,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO;AAC7C,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,CAAC,KAAK,EAAE;AACzB,QAAQ,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC1C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE;AAC7B,QAAQ,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC9C,KAAK;AACL,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,eAAe,CAAC;AAC1C,OAAO,CAAC,UAAU,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC;;"}
@@ -1,6 +1,6 @@
1
1
  import { AmplifyClassV6 } from '@aws-amplify/core';
2
2
  import { GraphQLOptions, GraphQLResult } from './types';
3
- import { InternalGraphQLAPIClass } from './internals';
3
+ import { InternalGraphQLAPIClass } from './internals/InternalGraphQLAPI';
4
4
  import { Observable } from 'rxjs';
5
5
  export declare const graphqlOperation: (query: any, variables?: {}, authToken?: string) => {
6
6
  query: any;
@@ -1,6 +1,5 @@
1
1
  import { Category, ApiAction } from '@aws-amplify/core/internals/utils';
2
2
  import { InternalGraphQLAPIClass } from './internals/InternalGraphQLAPI.mjs';
3
- import './types/index.mjs';
4
3
 
5
4
  const graphqlOperation = (query, variables = {}, authToken) => ({
6
5
  query,
@@ -1 +1 @@
1
- {"version":3,"file":"GraphQLAPI.mjs","sources":["../../src/GraphQLAPI.ts"],"sourcesContent":["import { Category, ApiAction } from '@aws-amplify/core/internals/utils';\nimport { InternalGraphQLAPIClass } from './internals';\nexport const graphqlOperation = (query, variables = {}, authToken) => ({\n query,\n variables,\n authToken,\n});\n/**\n * Export Cloud Logic APIs\n */\nexport class GraphQLAPIClass extends InternalGraphQLAPIClass {\n getModuleName() {\n return 'GraphQLAPI';\n }\n /**\n * Executes a GraphQL operation\n *\n * @param options - GraphQL Options\n * @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config\n * @returns An Observable if the query is a subscription query, else a promise of the graphql result.\n */\n graphql(amplify, options, additionalHeaders) {\n return super.graphql(amplify, options, additionalHeaders, {\n category: Category.API,\n action: ApiAction.GraphQl,\n });\n }\n /**\n * Checks to see if an error thrown is from an api request cancellation\n * @param error - Any error\n * @returns A boolean indicating if the error was from an api request cancellation\n */\n isCancelError(error) {\n return super.isCancelError(error);\n }\n /**\n * Cancels an inflight request. Only applicable for graphql queries and mutations\n * @param {any} request - request to cancel\n * @returns A boolean indicating if the request was cancelled\n */\n cancel(request, message) {\n return super.cancel(request, message);\n }\n}\nexport const GraphQLAPI = new GraphQLAPIClass(null);\n"],"names":[],"mappings":";;;;AAEY,MAAC,gBAAgB,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,SAAS,MAAM;AACvE,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,SAAS;AACb,CAAC,EAAE;AACH;AACA;AACA;AACO,MAAM,eAAe,SAAS,uBAAuB,CAAC;AAC7D,IAAI,aAAa,GAAG;AACpB,QAAQ,OAAO,YAAY,CAAC;AAC5B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;AACjD,QAAQ,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;AAClE,YAAY,QAAQ,EAAE,QAAQ,CAAC,GAAG;AAClC,YAAY,MAAM,EAAE,SAAS,CAAC,OAAO;AACrC,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,CAAC,KAAK,EAAE;AACzB,QAAQ,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC1C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE;AAC7B,QAAQ,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC9C,KAAK;AACL,CAAC;AACW,MAAC,UAAU,GAAG,IAAI,eAAe,CAAC,IAAI;;;;"}
1
+ {"version":3,"file":"GraphQLAPI.mjs","sources":["../../src/GraphQLAPI.ts"],"sourcesContent":["import { Category, ApiAction } from '@aws-amplify/core/internals/utils';\nimport { InternalGraphQLAPIClass } from './internals/InternalGraphQLAPI';\nexport const graphqlOperation = (query, variables = {}, authToken) => ({\n query,\n variables,\n authToken,\n});\n/**\n * Export Cloud Logic APIs\n */\nexport class GraphQLAPIClass extends InternalGraphQLAPIClass {\n getModuleName() {\n return 'GraphQLAPI';\n }\n /**\n * Executes a GraphQL operation\n *\n * @param options - GraphQL Options\n * @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config\n * @returns An Observable if the query is a subscription query, else a promise of the graphql result.\n */\n graphql(amplify, options, additionalHeaders) {\n return super.graphql(amplify, options, additionalHeaders, {\n category: Category.API,\n action: ApiAction.GraphQl,\n });\n }\n /**\n * Checks to see if an error thrown is from an api request cancellation\n * @param error - Any error\n * @returns A boolean indicating if the error was from an api request cancellation\n */\n isCancelError(error) {\n return super.isCancelError(error);\n }\n /**\n * Cancels an inflight request. Only applicable for graphql queries and mutations\n * @param {any} request - request to cancel\n * @returns A boolean indicating if the request was cancelled\n */\n cancel(request, message) {\n return super.cancel(request, message);\n }\n}\nexport const GraphQLAPI = new GraphQLAPIClass(null);\n"],"names":[],"mappings":";;;AAEY,MAAC,gBAAgB,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,SAAS,MAAM;AACvE,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,SAAS;AACb,CAAC,EAAE;AACH;AACA;AACA;AACO,MAAM,eAAe,SAAS,uBAAuB,CAAC;AAC7D,IAAI,aAAa,GAAG;AACpB,QAAQ,OAAO,YAAY,CAAC;AAC5B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;AACjD,QAAQ,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;AAClE,YAAY,QAAQ,EAAE,QAAQ,CAAC,GAAG;AAClC,YAAY,MAAM,EAAE,SAAS,CAAC,OAAO;AACrC,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,CAAC,KAAK,EAAE;AACzB,QAAQ,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC1C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE;AAC7B,QAAQ,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC9C,KAAK;AACL,CAAC;AACW,MAAC,UAAU,GAAG,IAAI,eAAe,CAAC,IAAI;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/api-graphql",
3
- "version": "4.0.1-mjs-test.6f5dab7.0+6f5dab7",
3
+ "version": "4.0.1-mjs-test.fc9412c.0+fc9412c",
4
4
  "description": "Api-graphql category of aws-amplify",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -71,9 +71,9 @@
71
71
  "internals"
72
72
  ],
73
73
  "dependencies": {
74
- "@aws-amplify/api-rest": "4.0.1-mjs-test.6f5dab7.0+6f5dab7",
75
- "@aws-amplify/auth": "6.0.1-mjs-test.6f5dab7.0+6f5dab7",
76
- "@aws-amplify/core": "6.0.1-mjs-test.6f5dab7.0+6f5dab7",
74
+ "@aws-amplify/api-rest": "4.0.1-mjs-test.fc9412c.0+fc9412c",
75
+ "@aws-amplify/auth": "6.0.1-mjs-test.fc9412c.0+fc9412c",
76
+ "@aws-amplify/core": "6.0.1-mjs-test.fc9412c.0+fc9412c",
77
77
  "@aws-sdk/types": "3.387.0",
78
78
  "graphql": "15.8.0",
79
79
  "rxjs": "^7.8.1",
@@ -142,5 +142,5 @@
142
142
  "<rootDir>/__tests__"
143
143
  ]
144
144
  },
145
- "gitHead": "6f5dab7f07d1781d39217d1e5a253c6a5165c8b2"
145
+ "gitHead": "fc9412ce1c1d7557b8b83ee4ba09a57afd1e36a1"
146
146
  }
package/src/GraphQLAPI.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  import { AmplifyClassV6 } from '@aws-amplify/core';
4
4
  import { Category, ApiAction } from '@aws-amplify/core/internals/utils';
5
5
  import { GraphQLOptions, GraphQLResult } from './types';
6
- import { InternalGraphQLAPIClass } from './internals';
6
+ import { InternalGraphQLAPIClass } from './internals/InternalGraphQLAPI';
7
7
  import { Observable } from 'rxjs';
8
8
 
9
9
  export const graphqlOperation = (