@aws-amplify/api-graphql 2.3.25 → 2.3.26-unstable.4
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/CHANGELOG.md +0 -8
- package/lib/GraphQLAPI.d.ts +81 -0
- package/lib/GraphQLAPI.js +22 -108
- package/lib/GraphQLAPI.js.map +1 -1
- package/lib/index.d.ts +5 -0
- package/lib/index.js +4 -16
- package/lib/index.js.map +1 -1
- package/lib/types/index.d.ts +30 -0
- package/lib/types/index.js.map +1 -1
- package/lib-esm/GraphQLAPI.js +5 -88
- package/lib-esm/GraphQLAPI.js.map +1 -1
- package/lib-esm/index.js +2 -12
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/types/index.js.map +1 -1
- package/package.json +16 -12
- package/src/GraphQLAPI.ts +4 -14
- package/src/index.ts +2 -12
- package/src/types/index.ts +2 -12
- package/build.js +0 -5
- package/dist/aws-amplify-api-graphql.js +0 -14409
- package/dist/aws-amplify-api-graphql.js.map +0 -1
- package/dist/aws-amplify-api-graphql.min.js +0 -11
- package/dist/aws-amplify-api-graphql.min.js.map +0 -1
- package/index-rn.js +0 -3
- package/index.js +0 -7
- package/webpack.config.dev.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,14 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [2.3.25](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api-graphql@2.3.24...@aws-amplify/api-graphql@2.3.25) (2022-11-04)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @aws-amplify/api-graphql
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
6
|
## [2.3.24](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api-graphql@2.3.23...@aws-amplify/api-graphql@2.3.24) (2022-10-27)
|
|
15
7
|
|
|
16
8
|
**Note:** Version bump only for package @aws-amplify/api-graphql
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { OperationTypeNode } from 'graphql';
|
|
2
|
+
import Observable from 'zen-observable-ts';
|
|
3
|
+
import { GraphQLOptions, GraphQLResult, GraphQLOperation } from './types';
|
|
4
|
+
export declare const graphqlOperation: (query: any, variables?: {}, authToken?: string, userAgentSuffix?: string) => {
|
|
5
|
+
query: any;
|
|
6
|
+
variables: {};
|
|
7
|
+
authToken: string;
|
|
8
|
+
userAgentSuffix: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Export Cloud Logic APIs
|
|
12
|
+
*/
|
|
13
|
+
export declare class GraphQLAPIClass {
|
|
14
|
+
/**
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
private _options;
|
|
18
|
+
private _api;
|
|
19
|
+
Auth: import("@aws-amplify/auth/lib-esm/Auth").AuthClass;
|
|
20
|
+
Cache: import("@aws-amplify/cache/lib-esm/types").ICache;
|
|
21
|
+
Credentials: import("@aws-amplify/core").CredentialsClass;
|
|
22
|
+
/**
|
|
23
|
+
* Initialize GraphQL API with AWS configuration
|
|
24
|
+
* @param {Object} options - Configuration object for API
|
|
25
|
+
*/
|
|
26
|
+
constructor(options: any);
|
|
27
|
+
getModuleName(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Configure API
|
|
30
|
+
* @param {Object} config - Configuration of the API
|
|
31
|
+
* @return {Object} - The current configuration
|
|
32
|
+
*/
|
|
33
|
+
configure(options: any): any;
|
|
34
|
+
/**
|
|
35
|
+
* Create an instance of API for the library
|
|
36
|
+
* @return - A promise of true if Success
|
|
37
|
+
*/
|
|
38
|
+
createInstance(): true | Promise<never>;
|
|
39
|
+
private _headerBasedAuth;
|
|
40
|
+
/**
|
|
41
|
+
* to get the operation type
|
|
42
|
+
* @param operation
|
|
43
|
+
*/
|
|
44
|
+
getGraphqlOperationType(operation: GraphQLOperation): OperationTypeNode;
|
|
45
|
+
/**
|
|
46
|
+
* Executes a GraphQL operation
|
|
47
|
+
*
|
|
48
|
+
* @param options - GraphQL Options
|
|
49
|
+
* @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config
|
|
50
|
+
* @returns An Observable if the query is a subscription query, else a promise of the graphql result.
|
|
51
|
+
*/
|
|
52
|
+
graphql<T = any>({ query: paramQuery, variables, authMode, authToken, userAgentSuffix, }: GraphQLOptions, additionalHeaders?: {
|
|
53
|
+
[key: string]: string;
|
|
54
|
+
}): Observable<GraphQLResult<T>> | Promise<GraphQLResult<T>>;
|
|
55
|
+
private _graphql;
|
|
56
|
+
createInstanceIfNotCreated(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Checks to see if an error thrown is from an api request cancellation
|
|
59
|
+
* @param {any} error - Any error
|
|
60
|
+
* @return {boolean} - A boolean indicating if the error was from an api request cancellation
|
|
61
|
+
*/
|
|
62
|
+
isCancel(error: any): any;
|
|
63
|
+
/**
|
|
64
|
+
* Cancels an inflight request. Only applicable for graphql queries and mutations
|
|
65
|
+
* @param {any} request - request to cancel
|
|
66
|
+
* @return {boolean} - A boolean indicating if the request was cancelled
|
|
67
|
+
*/
|
|
68
|
+
cancel(request: Promise<any>, message?: string): any;
|
|
69
|
+
/**
|
|
70
|
+
* Check if the request has a corresponding cancel token in the WeakMap.
|
|
71
|
+
* @params request - The request promise
|
|
72
|
+
* @return if the request has a corresponding cancel token.
|
|
73
|
+
*/
|
|
74
|
+
hasCancelToken(request: Promise<any>): any;
|
|
75
|
+
private _graphqlSubscribe;
|
|
76
|
+
/**
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
_ensureCredentials(): any;
|
|
80
|
+
}
|
|
81
|
+
export declare const GraphQLAPI: GraphQLAPIClass;
|
package/lib/GraphQLAPI.js
CHANGED
|
@@ -1,99 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
50
|
-
var t = {};
|
|
51
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
52
|
-
t[p] = s[p];
|
|
53
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
54
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
55
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
56
|
-
t[p[i]] = s[p[i]];
|
|
57
|
-
}
|
|
58
|
-
return t;
|
|
59
|
-
};
|
|
60
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
61
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
62
|
-
if (!m) return o;
|
|
63
|
-
var i = m.call(o), r, ar = [], e;
|
|
64
|
-
try {
|
|
65
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
66
|
-
}
|
|
67
|
-
catch (error) { e = { error: error }; }
|
|
68
|
-
finally {
|
|
69
|
-
try {
|
|
70
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
71
|
-
}
|
|
72
|
-
finally { if (e) throw e.error; }
|
|
73
|
-
}
|
|
74
|
-
return ar;
|
|
75
|
-
};
|
|
76
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
77
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
78
|
-
};
|
|
79
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
84
|
-
* the License. A copy of the License is located at
|
|
85
|
-
*
|
|
86
|
-
* http://aws.amazon.com/apache2.0/
|
|
87
|
-
*
|
|
88
|
-
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
89
|
-
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
90
|
-
* and limitations under the License.
|
|
91
|
-
*/
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
92
6
|
var graphql_1 = require("graphql");
|
|
93
7
|
var core_1 = require("@aws-amplify/core");
|
|
94
8
|
var pubsub_1 = require("@aws-amplify/pubsub");
|
|
95
|
-
var auth_1 =
|
|
96
|
-
var cache_1 =
|
|
9
|
+
var auth_1 = require("@aws-amplify/auth");
|
|
10
|
+
var cache_1 = require("@aws-amplify/cache");
|
|
97
11
|
var types_1 = require("./types");
|
|
98
12
|
var api_rest_1 = require("@aws-amplify/api-rest");
|
|
99
13
|
var USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
@@ -117,8 +31,8 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
117
31
|
*/
|
|
118
32
|
function GraphQLAPIClass(options) {
|
|
119
33
|
this._api = null;
|
|
120
|
-
this.Auth = auth_1.
|
|
121
|
-
this.Cache = cache_1.
|
|
34
|
+
this.Auth = auth_1.Auth;
|
|
35
|
+
this.Cache = cache_1.Cache;
|
|
122
36
|
this.Credentials = core_1.Credentials;
|
|
123
37
|
this._options = options;
|
|
124
38
|
logger.debug('API Options', this._options);
|
|
@@ -132,8 +46,8 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
132
46
|
* @return {Object} - The current configuration
|
|
133
47
|
*/
|
|
134
48
|
GraphQLAPIClass.prototype.configure = function (options) {
|
|
135
|
-
var _a = options || {}, _b = _a.API, API = _b === void 0 ? {} : _b, otherOptions = __rest(_a, ["API"]);
|
|
136
|
-
var opt = __assign(__assign({}, otherOptions), API);
|
|
49
|
+
var _a = options || {}, _b = _a.API, API = _b === void 0 ? {} : _b, otherOptions = tslib_1.__rest(_a, ["API"]);
|
|
50
|
+
var opt = tslib_1.__assign(tslib_1.__assign({}, otherOptions), API);
|
|
137
51
|
logger.debug('configure GraphQL API', { opt: opt });
|
|
138
52
|
if (opt['aws_project_region']) {
|
|
139
53
|
opt = Object.assign({}, opt, {
|
|
@@ -168,9 +82,9 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
168
82
|
};
|
|
169
83
|
GraphQLAPIClass.prototype._headerBasedAuth = function (defaultAuthenticationType, additionalHeaders) {
|
|
170
84
|
if (additionalHeaders === void 0) { additionalHeaders = {}; }
|
|
171
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
172
86
|
var _a, aws_appsync_authenticationType, apiKey, authenticationType, headers, _b, credentialsOK, token, federatedInfo, currentUser, e_1, session, e_2;
|
|
173
|
-
return __generator(this, function (_c) {
|
|
87
|
+
return tslib_1.__generator(this, function (_c) {
|
|
174
88
|
switch (_c.label) {
|
|
175
89
|
case 0:
|
|
176
90
|
_a = this._options, aws_appsync_authenticationType = _a.aws_appsync_authenticationType, apiKey = _a.aws_appsync_apiKey;
|
|
@@ -204,13 +118,13 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
204
118
|
case 4:
|
|
205
119
|
_c.trys.push([4, 9, , 10]);
|
|
206
120
|
token = void 0;
|
|
207
|
-
return [4 /*yield*/, cache_1.
|
|
121
|
+
return [4 /*yield*/, cache_1.Cache.getItem('federatedInfo')];
|
|
208
122
|
case 5:
|
|
209
123
|
federatedInfo = _c.sent();
|
|
210
124
|
if (!federatedInfo) return [3 /*break*/, 6];
|
|
211
125
|
token = federatedInfo.token;
|
|
212
126
|
return [3 /*break*/, 8];
|
|
213
|
-
case 6: return [4 /*yield*/, auth_1.
|
|
127
|
+
case 6: return [4 /*yield*/, auth_1.Auth.currentAuthenticatedUser()];
|
|
214
128
|
case 7:
|
|
215
129
|
currentUser = _c.sent();
|
|
216
130
|
if (currentUser) {
|
|
@@ -267,7 +181,7 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
267
181
|
GraphQLAPIClass.prototype.getGraphqlOperationType = function (operation) {
|
|
268
182
|
var doc = graphql_1.parse(operation);
|
|
269
183
|
var definitions = doc.definitions;
|
|
270
|
-
var _a = __read(definitions, 1), operationType = _a[0].operation;
|
|
184
|
+
var _a = tslib_1.__read(definitions, 1), operationType = _a[0].operation;
|
|
271
185
|
return operationType;
|
|
272
186
|
};
|
|
273
187
|
/**
|
|
@@ -282,7 +196,7 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
282
196
|
var query = typeof paramQuery === 'string'
|
|
283
197
|
? graphql_1.parse(paramQuery)
|
|
284
198
|
: graphql_1.parse(graphql_1.print(paramQuery));
|
|
285
|
-
var _c = __read(query.definitions.filter(function (def) { return def.kind === 'OperationDefinition'; }), 1), _d = _c[0], operationDef = _d === void 0 ? {} : _d;
|
|
199
|
+
var _c = tslib_1.__read(query.definitions.filter(function (def) { return def.kind === 'OperationDefinition'; }), 1), _d = _c[0], operationDef = _d === void 0 ? {} : _d;
|
|
286
200
|
var operationType = operationDef.operation;
|
|
287
201
|
var headers = additionalHeaders || {};
|
|
288
202
|
// if an authorization header is set, have the explicit authToken take precedence
|
|
@@ -308,10 +222,10 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
308
222
|
var query = _a.query, variables = _a.variables, authMode = _a.authMode, userAgentSuffix = _a.userAgentSuffix;
|
|
309
223
|
if (additionalHeaders === void 0) { additionalHeaders = {}; }
|
|
310
224
|
if (initParams === void 0) { initParams = {}; }
|
|
311
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
225
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
312
226
|
var _b, region, appSyncGraphqlEndpoint, _c, graphql_headers, customGraphqlEndpoint, customEndpointRegion, headers, _d, _e, _f, _g, _h, _j, body, init, endpoint, error, response, err_1, errors;
|
|
313
227
|
var _k;
|
|
314
|
-
return __generator(this, function (_l) {
|
|
228
|
+
return tslib_1.__generator(this, function (_l) {
|
|
315
229
|
switch (_l.label) {
|
|
316
230
|
case 0:
|
|
317
231
|
this.createInstanceIfNotCreated();
|
|
@@ -324,7 +238,7 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
324
238
|
_e = (_l.sent());
|
|
325
239
|
_l.label = 2;
|
|
326
240
|
case 2:
|
|
327
|
-
_f = [__assign.apply(void 0, _d.concat([(_e)]))];
|
|
241
|
+
_f = [tslib_1.__assign.apply(void 0, _d.concat([(_e)]))];
|
|
328
242
|
_g = customGraphqlEndpoint;
|
|
329
243
|
if (!_g) return [3 /*break*/, 6];
|
|
330
244
|
if (!customEndpointRegion) return [3 /*break*/, 4];
|
|
@@ -339,10 +253,10 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
339
253
|
_g = (_h);
|
|
340
254
|
_l.label = 6;
|
|
341
255
|
case 6:
|
|
342
|
-
_j = [__assign.apply(void 0, _f.concat([(_g)]))];
|
|
256
|
+
_j = [tslib_1.__assign.apply(void 0, _f.concat([(_g)]))];
|
|
343
257
|
return [4 /*yield*/, graphql_headers({ query: query, variables: variables })];
|
|
344
258
|
case 7:
|
|
345
|
-
headers = __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), additionalHeaders]), (!customGraphqlEndpoint && (_k = {},
|
|
259
|
+
headers = tslib_1.__assign.apply(void 0, [tslib_1.__assign.apply(void 0, [tslib_1.__assign.apply(void 0, _j.concat([(_l.sent())])), additionalHeaders]), (!customGraphqlEndpoint && (_k = {},
|
|
346
260
|
_k[USER_AGENT_HEADER] = core_1.getAmplifyUserAgent(userAgentSuffix),
|
|
347
261
|
_k))]);
|
|
348
262
|
body = {
|
|
@@ -396,8 +310,8 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
396
310
|
});
|
|
397
311
|
};
|
|
398
312
|
GraphQLAPIClass.prototype.createInstanceIfNotCreated = function () {
|
|
399
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
400
|
-
return __generator(this, function (_a) {
|
|
313
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
314
|
+
return tslib_1.__generator(this, function (_a) {
|
|
401
315
|
switch (_a.label) {
|
|
402
316
|
case 0:
|
|
403
317
|
if (!!this._api) return [3 /*break*/, 2];
|
package/lib/GraphQLAPI.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphQLAPI.js","sourceRoot":"","sources":["../src/GraphQLAPI.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GraphQLAPI.js","sourceRoot":"","sources":["../src/GraphQLAPI.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,mCAOiB;AAEjB,0CAM2B;AAC3B,8CAA6C;AAC7C,0CAAyC;AACzC,4CAA2C;AAC3C,iCAKiB;AACjB,kDAAmD;AACnD,IAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAE7C,IAAM,MAAM,GAAG,IAAI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
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
6
|
-
* the License. A copy of the License is located at
|
|
7
|
-
*
|
|
8
|
-
* http://aws.amazon.com/apache2.0/
|
|
9
|
-
*
|
|
10
|
-
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
11
|
-
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
12
|
-
* and limitations under the License.
|
|
13
|
-
*/
|
|
14
|
-
function __export(m) {
|
|
15
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
16
|
-
}
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var tslib_1 = require("tslib");
|
|
18
6
|
var GraphQLAPI_1 = require("./GraphQLAPI");
|
|
19
7
|
var types_1 = require("./types");
|
|
20
8
|
exports.GraphQLAuthError = types_1.GraphQLAuthError;
|
|
@@ -23,6 +11,6 @@ var GraphQLAPI_2 = require("./GraphQLAPI");
|
|
|
23
11
|
exports.GraphQLAPI = GraphQLAPI_2.GraphQLAPI;
|
|
24
12
|
exports.GraphQLAPIClass = GraphQLAPI_2.GraphQLAPIClass;
|
|
25
13
|
exports.graphqlOperation = GraphQLAPI_2.graphqlOperation;
|
|
26
|
-
|
|
14
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
27
15
|
exports.default = GraphQLAPI_1.GraphQLAPI;
|
|
28
16
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,2CAA0C;AAC1C,iCAA6E;AAArD,mCAAA,gBAAgB,CAAA;AAAE,oCAAA,iBAAiB,CAAA;AAC3D,2CAA6E;AAApE,kCAAA,UAAU,CAAA;AAAE,uCAAA,eAAe,CAAA;AAAE,wCAAA,gBAAgB,CAAA;AACtD,kDAAwB;AACxB,kBAAe,uBAAU,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Source, DocumentNode, GraphQLError } from 'graphql';
|
|
2
|
+
export { OperationTypeNode } from 'graphql';
|
|
3
|
+
import { GRAPHQL_AUTH_MODE } from '@aws-amplify/auth';
|
|
4
|
+
export { GRAPHQL_AUTH_MODE };
|
|
5
|
+
export interface GraphQLOptions {
|
|
6
|
+
query: string | DocumentNode;
|
|
7
|
+
variables?: object;
|
|
8
|
+
authMode?: keyof typeof GRAPHQL_AUTH_MODE;
|
|
9
|
+
authToken?: string;
|
|
10
|
+
userAgentSuffix?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface GraphQLResult<T = object> {
|
|
13
|
+
data?: T;
|
|
14
|
+
errors?: GraphQLError[];
|
|
15
|
+
extensions?: {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare enum GraphQLAuthError {
|
|
20
|
+
NO_API_KEY = "No api-key configured",
|
|
21
|
+
NO_CURRENT_USER = "No current user",
|
|
22
|
+
NO_CREDENTIALS = "No credentials",
|
|
23
|
+
NO_FEDERATED_JWT = "No federated jwt",
|
|
24
|
+
NO_AUTH_TOKEN = "No auth token specified"
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* GraphQLSource or string, the type of the parameter for calling graphql.parse
|
|
28
|
+
* @see: https://graphql.org/graphql-js/language/#parse
|
|
29
|
+
*/
|
|
30
|
+
export declare type GraphQLOperation = Source | string;
|
package/lib/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;AAIA,0CAAsD;AAC7C,4BADA,wBAAiB,CACA;AAkB1B,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC3B,wDAAoC,CAAA;IACpC,uDAAmC,CAAA;IACnC,qDAAiC,CAAA;IACjC,yDAAqC,CAAA;IACrC,6DAAyC,CAAA;AAC1C,CAAC,EANW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAM3B"}
|
package/lib-esm/GraphQLAPI.js
CHANGED
|
@@ -1,94 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
-
function step(op) {
|
|
26
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
28
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
-
switch (op[0]) {
|
|
31
|
-
case 0: case 1: t = op; break;
|
|
32
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
-
default:
|
|
36
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
-
if (t[2]) _.ops.pop();
|
|
41
|
-
_.trys.pop(); continue;
|
|
42
|
-
}
|
|
43
|
-
op = body.call(thisArg, _);
|
|
44
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
49
|
-
var t = {};
|
|
50
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
51
|
-
t[p] = s[p];
|
|
52
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
53
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
55
|
-
t[p[i]] = s[p[i]];
|
|
56
|
-
}
|
|
57
|
-
return t;
|
|
58
|
-
};
|
|
59
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
60
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
61
|
-
if (!m) return o;
|
|
62
|
-
var i = m.call(o), r, ar = [], e;
|
|
63
|
-
try {
|
|
64
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
65
|
-
}
|
|
66
|
-
catch (error) { e = { error: error }; }
|
|
67
|
-
finally {
|
|
68
|
-
try {
|
|
69
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
70
|
-
}
|
|
71
|
-
finally { if (e) throw e.error; }
|
|
72
|
-
}
|
|
73
|
-
return ar;
|
|
74
|
-
};
|
|
75
|
-
/*
|
|
76
|
-
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
77
|
-
*
|
|
78
|
-
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
79
|
-
* the License. A copy of the License is located at
|
|
80
|
-
*
|
|
81
|
-
* http://aws.amazon.com/apache2.0/
|
|
82
|
-
*
|
|
83
|
-
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
84
|
-
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
85
|
-
* and limitations under the License.
|
|
86
|
-
*/
|
|
1
|
+
import { __assign, __awaiter, __generator, __read, __rest } from "tslib";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
87
4
|
import { print, parse, GraphQLError, } from 'graphql';
|
|
88
5
|
import { Amplify, ConsoleLogger as Logger, Credentials, getAmplifyUserAgent, INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER, } from '@aws-amplify/core';
|
|
89
6
|
import { PubSub } from '@aws-amplify/pubsub';
|
|
90
|
-
import Auth from '@aws-amplify/auth';
|
|
91
|
-
import Cache from '@aws-amplify/cache';
|
|
7
|
+
import { Auth } from '@aws-amplify/auth';
|
|
8
|
+
import { Cache } from '@aws-amplify/cache';
|
|
92
9
|
import { GraphQLAuthError, } from './types';
|
|
93
10
|
import { RestClient } from '@aws-amplify/api-rest';
|
|
94
11
|
var USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphQLAPI.js","sourceRoot":"","sources":["../src/GraphQLAPI.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GraphQLAPI.js","sourceRoot":"","sources":["../src/GraphQLAPI.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAGN,KAAK,EACL,KAAK,EACL,YAAY,GAEZ,MAAM,SAAS,CAAC;AAEjB,OAAO,EACN,OAAO,EACP,aAAa,IAAI,MAAM,EACvB,WAAW,EACX,mBAAmB,EACnB,6CAA6C,GAC7C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACN,gBAAgB,GAIhB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,IAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAE7C,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC;AAExC,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAC/B,KAAK,EACL,SAAc,EACd,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AsB,wBAAA;gBACtB,kBAAkB,oBAAA;gBAClB,MAAM,QAAA;gBACN,KAAK,EAAE,KAAK,CAAC,KAAqB,CAAC;gBACnC,MAAM,QAAA;gBACN,SAAS,WAAA;gBACT,eAAe,iBAAA;gBACf,iBAAiB,mBAAA;gBACjB,SAAS,WAAA;aACT,CAAC,CAAC;SACH;aAAM;YACN,MAAM,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;YAC1D,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;SAC7D;IACF,CAAC;IAED;;OAEG;IACH,4CAAkB,GAAlB;QAAA,iBAaC;QAZA,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE;aAC3B,IAAI,CAAC,UAAA,WAAW;YAChB,IAAI,CAAC,WAAW;gBAAE,OAAO,KAAK,CAAC;YAC/B,IAAM,IAAI,GAAG,KAAI,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YACjD,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,IAAI,CAAC,CAAC;YAE9C,OAAO,IAAI,CAAC;QACb,CAAC,CAAC;aACD,KAAK,CAAC,UAAA,GAAG;YACT,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE,GAAG,CAAC,CAAC;YAC7C,OAAO,KAAK,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IACF,sBAAC;AAAD,CAAC,AAtYD,IAsYC;;AAED,MAAM,CAAC,IAAM,UAAU,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AACpD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC"}
|
package/lib-esm/index.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
5
|
-
* the License. A copy of the License is located at
|
|
6
|
-
*
|
|
7
|
-
* http://aws.amazon.com/apache2.0/
|
|
8
|
-
*
|
|
9
|
-
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
10
|
-
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
11
|
-
* and limitations under the License.
|
|
12
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
import { GraphQLAPI } from './GraphQLAPI';
|
|
14
4
|
export { GraphQLAuthError, GRAPHQL_AUTH_MODE } from './types';
|
|
15
5
|
export { GraphQLAPI, GraphQLAPIClass, graphqlOperation } from './GraphQLAPI';
|
package/lib-esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAiB,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7E,cAAc,SAAS,CAAC;AACxB,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAkB7B,MAAM,CAAN,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC3B,wDAAoC,CAAA;IACpC,uDAAmC,CAAA;IACnC,qDAAiC,CAAA;IACjC,yDAAqC,CAAA;IACrC,6DAAyC,CAAA;AAC1C,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,QAM3B"}
|