@aws-amplify/api-graphql 2.3.26-unstable.2 → 2.3.26
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 +16 -0
- package/build.js +5 -0
- package/dist/aws-amplify-api-graphql.js +14409 -0
- package/dist/aws-amplify-api-graphql.js.map +1 -0
- package/dist/aws-amplify-api-graphql.min.js +11 -0
- package/dist/aws-amplify-api-graphql.min.js.map +1 -0
- package/index-rn.js +3 -0
- package/index.js +7 -0
- package/lib/GraphQLAPI.js +108 -22
- package/lib/GraphQLAPI.js.map +1 -1
- package/lib/index.js +16 -4
- package/lib/index.js.map +1 -1
- package/lib/types/index.js.map +1 -1
- package/lib-esm/GraphQLAPI.js +88 -5
- package/lib-esm/GraphQLAPI.js.map +1 -1
- package/lib-esm/index.js +12 -2
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/types/index.js.map +1 -1
- package/package.json +12 -16
- package/src/GraphQLAPI.ts +14 -4
- package/src/index.ts +12 -2
- package/src/types/index.ts +12 -2
- package/webpack.config.dev.js +6 -0
- package/lib/GraphQLAPI.d.ts +0 -81
- package/lib/index.d.ts +0 -5
- package/lib/types/index.d.ts +0 -30
package/index-rn.js
ADDED
package/index.js
ADDED
package/lib/GraphQLAPI.js
CHANGED
|
@@ -1,13 +1,99 @@
|
|
|
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
|
+
};
|
|
2
79
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
80
|
+
/*
|
|
81
|
+
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
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
|
+
*/
|
|
6
92
|
var graphql_1 = require("graphql");
|
|
7
93
|
var core_1 = require("@aws-amplify/core");
|
|
8
94
|
var pubsub_1 = require("@aws-amplify/pubsub");
|
|
9
|
-
var auth_1 = require("@aws-amplify/auth");
|
|
10
|
-
var cache_1 = require("@aws-amplify/cache");
|
|
95
|
+
var auth_1 = __importDefault(require("@aws-amplify/auth"));
|
|
96
|
+
var cache_1 = __importDefault(require("@aws-amplify/cache"));
|
|
11
97
|
var types_1 = require("./types");
|
|
12
98
|
var api_rest_1 = require("@aws-amplify/api-rest");
|
|
13
99
|
var USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
@@ -31,8 +117,8 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
31
117
|
*/
|
|
32
118
|
function GraphQLAPIClass(options) {
|
|
33
119
|
this._api = null;
|
|
34
|
-
this.Auth = auth_1.
|
|
35
|
-
this.Cache = cache_1.
|
|
120
|
+
this.Auth = auth_1.default;
|
|
121
|
+
this.Cache = cache_1.default;
|
|
36
122
|
this.Credentials = core_1.Credentials;
|
|
37
123
|
this._options = options;
|
|
38
124
|
logger.debug('API Options', this._options);
|
|
@@ -46,8 +132,8 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
46
132
|
* @return {Object} - The current configuration
|
|
47
133
|
*/
|
|
48
134
|
GraphQLAPIClass.prototype.configure = function (options) {
|
|
49
|
-
var _a = options || {}, _b = _a.API, API = _b === void 0 ? {} : _b, otherOptions =
|
|
50
|
-
var opt =
|
|
135
|
+
var _a = options || {}, _b = _a.API, API = _b === void 0 ? {} : _b, otherOptions = __rest(_a, ["API"]);
|
|
136
|
+
var opt = __assign(__assign({}, otherOptions), API);
|
|
51
137
|
logger.debug('configure GraphQL API', { opt: opt });
|
|
52
138
|
if (opt['aws_project_region']) {
|
|
53
139
|
opt = Object.assign({}, opt, {
|
|
@@ -82,9 +168,9 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
82
168
|
};
|
|
83
169
|
GraphQLAPIClass.prototype._headerBasedAuth = function (defaultAuthenticationType, additionalHeaders) {
|
|
84
170
|
if (additionalHeaders === void 0) { additionalHeaders = {}; }
|
|
85
|
-
return
|
|
171
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
86
172
|
var _a, aws_appsync_authenticationType, apiKey, authenticationType, headers, _b, credentialsOK, token, federatedInfo, currentUser, e_1, session, e_2;
|
|
87
|
-
return
|
|
173
|
+
return __generator(this, function (_c) {
|
|
88
174
|
switch (_c.label) {
|
|
89
175
|
case 0:
|
|
90
176
|
_a = this._options, aws_appsync_authenticationType = _a.aws_appsync_authenticationType, apiKey = _a.aws_appsync_apiKey;
|
|
@@ -118,13 +204,13 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
118
204
|
case 4:
|
|
119
205
|
_c.trys.push([4, 9, , 10]);
|
|
120
206
|
token = void 0;
|
|
121
|
-
return [4 /*yield*/, cache_1.
|
|
207
|
+
return [4 /*yield*/, cache_1.default.getItem('federatedInfo')];
|
|
122
208
|
case 5:
|
|
123
209
|
federatedInfo = _c.sent();
|
|
124
210
|
if (!federatedInfo) return [3 /*break*/, 6];
|
|
125
211
|
token = federatedInfo.token;
|
|
126
212
|
return [3 /*break*/, 8];
|
|
127
|
-
case 6: return [4 /*yield*/, auth_1.
|
|
213
|
+
case 6: return [4 /*yield*/, auth_1.default.currentAuthenticatedUser()];
|
|
128
214
|
case 7:
|
|
129
215
|
currentUser = _c.sent();
|
|
130
216
|
if (currentUser) {
|
|
@@ -181,7 +267,7 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
181
267
|
GraphQLAPIClass.prototype.getGraphqlOperationType = function (operation) {
|
|
182
268
|
var doc = graphql_1.parse(operation);
|
|
183
269
|
var definitions = doc.definitions;
|
|
184
|
-
var _a =
|
|
270
|
+
var _a = __read(definitions, 1), operationType = _a[0].operation;
|
|
185
271
|
return operationType;
|
|
186
272
|
};
|
|
187
273
|
/**
|
|
@@ -196,7 +282,7 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
196
282
|
var query = typeof paramQuery === 'string'
|
|
197
283
|
? graphql_1.parse(paramQuery)
|
|
198
284
|
: graphql_1.parse(graphql_1.print(paramQuery));
|
|
199
|
-
var _c =
|
|
285
|
+
var _c = __read(query.definitions.filter(function (def) { return def.kind === 'OperationDefinition'; }), 1), _d = _c[0], operationDef = _d === void 0 ? {} : _d;
|
|
200
286
|
var operationType = operationDef.operation;
|
|
201
287
|
var headers = additionalHeaders || {};
|
|
202
288
|
// if an authorization header is set, have the explicit authToken take precedence
|
|
@@ -222,10 +308,10 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
222
308
|
var query = _a.query, variables = _a.variables, authMode = _a.authMode, userAgentSuffix = _a.userAgentSuffix;
|
|
223
309
|
if (additionalHeaders === void 0) { additionalHeaders = {}; }
|
|
224
310
|
if (initParams === void 0) { initParams = {}; }
|
|
225
|
-
return
|
|
311
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
226
312
|
var _b, region, appSyncGraphqlEndpoint, _c, graphql_headers, customGraphqlEndpoint, customEndpointRegion, headers, _d, _e, _f, _g, _h, _j, body, init, endpoint, error, response, err_1, errors;
|
|
227
313
|
var _k;
|
|
228
|
-
return
|
|
314
|
+
return __generator(this, function (_l) {
|
|
229
315
|
switch (_l.label) {
|
|
230
316
|
case 0:
|
|
231
317
|
this.createInstanceIfNotCreated();
|
|
@@ -238,7 +324,7 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
238
324
|
_e = (_l.sent());
|
|
239
325
|
_l.label = 2;
|
|
240
326
|
case 2:
|
|
241
|
-
_f = [
|
|
327
|
+
_f = [__assign.apply(void 0, _d.concat([(_e)]))];
|
|
242
328
|
_g = customGraphqlEndpoint;
|
|
243
329
|
if (!_g) return [3 /*break*/, 6];
|
|
244
330
|
if (!customEndpointRegion) return [3 /*break*/, 4];
|
|
@@ -253,10 +339,10 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
253
339
|
_g = (_h);
|
|
254
340
|
_l.label = 6;
|
|
255
341
|
case 6:
|
|
256
|
-
_j = [
|
|
342
|
+
_j = [__assign.apply(void 0, _f.concat([(_g)]))];
|
|
257
343
|
return [4 /*yield*/, graphql_headers({ query: query, variables: variables })];
|
|
258
344
|
case 7:
|
|
259
|
-
headers =
|
|
345
|
+
headers = __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), additionalHeaders]), (!customGraphqlEndpoint && (_k = {},
|
|
260
346
|
_k[USER_AGENT_HEADER] = core_1.getAmplifyUserAgent(userAgentSuffix),
|
|
261
347
|
_k))]);
|
|
262
348
|
body = {
|
|
@@ -310,8 +396,8 @@ var GraphQLAPIClass = /** @class */ (function () {
|
|
|
310
396
|
});
|
|
311
397
|
};
|
|
312
398
|
GraphQLAPIClass.prototype.createInstanceIfNotCreated = function () {
|
|
313
|
-
return
|
|
314
|
-
return
|
|
399
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
400
|
+
return __generator(this, function (_a) {
|
|
315
401
|
switch (_a.label) {
|
|
316
402
|
case 0:
|
|
317
403
|
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;;;;;;;;;;;GAWG;AACH,mCAOiB;AAEjB,0CAM2B;AAC3B,8CAA6C;AAC7C,2DAAqC;AACrC,6DAAuC;AACvC,iCAKiB;AACjB,kDAAmD;AACnD,IAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAE7C,IAAM,MAAM,GAAG,IAAI,oBAAM,CAAC,YAAY,CAAC,CAAC;AAE3B,QAAA,gBAAgB,GAAG,UAC/B,KAAK,EACL,SAAc,EACd,SAAkB,EAClB,eAAwB;IAFxB,0BAAA,EAAA,cAAc;IAGV,OAAA,CAAC;QACL,KAAK,OAAA;QACL,SAAS,WAAA;QACT,SAAS,WAAA;QACT,eAAe,iBAAA;KACf,CAAC;AALG,CAKH,CAAC;AAEH;;GAEG;AACH;IAWC;;;OAGG;IACH,yBAAY,OAAO;QAVX,SAAI,GAAG,IAAI,CAAC;QAEpB,SAAI,GAAG,cAAI,CAAC;QACZ,UAAK,GAAG,eAAK,CAAC;QACd,gBAAW,GAAG,kBAAW,CAAC;QAOzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAEM,uCAAa,GAApB;QACC,OAAO,YAAY,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACH,mCAAS,GAAT,UAAU,OAAO;QAChB,IAAM,kBAA6C,EAA3C,WAAQ,EAAR,6BAAQ,EAAE,kCAAiC,CAAC;QACpD,IAAI,GAAG,yBAAQ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AAC;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;AAtYY,0CAAe;AAwYf,QAAA,UAAU,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AACpD,cAAO,CAAC,QAAQ,CAAC,kBAAU,CAAC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
*
|
|
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
|
+
}
|
|
4
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
var tslib_1 = require("tslib");
|
|
6
18
|
var GraphQLAPI_1 = require("./GraphQLAPI");
|
|
7
19
|
var types_1 = require("./types");
|
|
8
20
|
exports.GraphQLAuthError = types_1.GraphQLAuthError;
|
|
@@ -11,6 +23,6 @@ var GraphQLAPI_2 = require("./GraphQLAPI");
|
|
|
11
23
|
exports.GraphQLAPI = GraphQLAPI_2.GraphQLAPI;
|
|
12
24
|
exports.GraphQLAPIClass = GraphQLAPI_2.GraphQLAPIClass;
|
|
13
25
|
exports.graphqlOperation = GraphQLAPI_2.graphqlOperation;
|
|
14
|
-
|
|
26
|
+
__export(require("./types"));
|
|
15
27
|
exports.default = GraphQLAPI_1.GraphQLAPI;
|
|
16
28
|
//# 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;;;;;;;;;;;GAWG;;;;;AAEH,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,6BAAwB;AACxB,kBAAe,uBAAU,CAAC"}
|
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":";;AAcA,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,11 +1,94 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
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
|
+
*/
|
|
4
87
|
import { print, parse, GraphQLError, } from 'graphql';
|
|
5
88
|
import { Amplify, ConsoleLogger as Logger, Credentials, getAmplifyUserAgent, INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER, } from '@aws-amplify/core';
|
|
6
89
|
import { PubSub } from '@aws-amplify/pubsub';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
90
|
+
import Auth from '@aws-amplify/auth';
|
|
91
|
+
import Cache from '@aws-amplify/cache';
|
|
9
92
|
import { GraphQLAuthError, } from './types';
|
|
10
93
|
import { RestClient } from '@aws-amplify/api-rest';
|
|
11
94
|
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","sour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;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,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
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
|
+
*/
|
|
3
13
|
import { GraphQLAPI } from './GraphQLAPI';
|
|
4
14
|
export { GraphQLAuthError, GRAPHQL_AUTH_MODE } from './types';
|
|
5
15
|
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;;;;;;;;;;;GAWG;AAEH,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":"AAcA,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/api-graphql",
|
|
3
|
-
"version": "2.3.26
|
|
3
|
+
"version": "2.3.26",
|
|
4
4
|
"description": "Api-graphql category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
"./lib/index": "./lib-esm/index.js"
|
|
10
10
|
},
|
|
11
11
|
"sideEffects": [
|
|
12
|
+
"./src/GraphQLAPI.ts",
|
|
12
13
|
"./lib/GraphQLAPI.js",
|
|
13
|
-
"./lib-esm/GraphQLAPI.js"
|
|
14
|
+
"./lib-esm/GraphQLAPI.js",
|
|
15
|
+
"./dist/aws-amplify-api-graphql.js",
|
|
16
|
+
"./dist/aws-amplify-api-graphql.min.js"
|
|
14
17
|
],
|
|
15
18
|
"publishConfig": {
|
|
16
19
|
"access": "public"
|
|
@@ -25,8 +28,7 @@
|
|
|
25
28
|
"build": "npm run clean && npm run build:esm && npm run build:cjs",
|
|
26
29
|
"clean": "rimraf lib-esm lib dist",
|
|
27
30
|
"format": "echo \"Not implemented\"",
|
|
28
|
-
"lint": "tslint 'src/**/*.ts'
|
|
29
|
-
"ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 75.62"
|
|
31
|
+
"lint": "tslint 'src/**/*.ts'"
|
|
30
32
|
},
|
|
31
33
|
"repository": {
|
|
32
34
|
"type": "git",
|
|
@@ -41,19 +43,13 @@
|
|
|
41
43
|
"devDependencies": {
|
|
42
44
|
"@types/zen-observable": "^0.8.0"
|
|
43
45
|
},
|
|
44
|
-
"files": [
|
|
45
|
-
"lib",
|
|
46
|
-
"lib-esm",
|
|
47
|
-
"src"
|
|
48
|
-
],
|
|
49
46
|
"dependencies": {
|
|
50
|
-
"@aws-amplify/api-rest": "2.0.62
|
|
51
|
-
"@aws-amplify/auth": "4.6.15
|
|
52
|
-
"@aws-amplify/cache": "4.0.64
|
|
53
|
-
"@aws-amplify/core": "4.7.13
|
|
54
|
-
"@aws-amplify/pubsub": "4.5.12
|
|
47
|
+
"@aws-amplify/api-rest": "2.0.62",
|
|
48
|
+
"@aws-amplify/auth": "4.6.15",
|
|
49
|
+
"@aws-amplify/cache": "4.0.64",
|
|
50
|
+
"@aws-amplify/core": "4.7.13",
|
|
51
|
+
"@aws-amplify/pubsub": "4.5.12",
|
|
55
52
|
"graphql": "15.8.0",
|
|
56
|
-
"tslib": "^1.8.0",
|
|
57
53
|
"uuid": "^3.2.1",
|
|
58
54
|
"zen-observable-ts": "0.8.19"
|
|
59
55
|
},
|
|
@@ -101,5 +97,5 @@
|
|
|
101
97
|
"lib-esm"
|
|
102
98
|
]
|
|
103
99
|
},
|
|
104
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "eaa4317115aaa23a632af7249b3d995e83af6ef3"
|
|
105
101
|
}
|
package/src/GraphQLAPI.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
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
|
+
*/
|
|
3
13
|
import {
|
|
4
14
|
DocumentNode,
|
|
5
15
|
OperationDefinitionNode,
|
|
@@ -17,8 +27,8 @@ import {
|
|
|
17
27
|
INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER,
|
|
18
28
|
} from '@aws-amplify/core';
|
|
19
29
|
import { PubSub } from '@aws-amplify/pubsub';
|
|
20
|
-
import
|
|
21
|
-
import
|
|
30
|
+
import Auth from '@aws-amplify/auth';
|
|
31
|
+
import Cache from '@aws-amplify/cache';
|
|
22
32
|
import {
|
|
23
33
|
GraphQLAuthError,
|
|
24
34
|
GraphQLOptions,
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
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
|
+
*/
|
|
3
13
|
|
|
4
14
|
import { GraphQLAPI } from './GraphQLAPI';
|
|
5
15
|
export { GraphQLResult, GraphQLAuthError, GRAPHQL_AUTH_MODE } from './types';
|
package/src/types/index.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
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
|
+
*/
|
|
3
13
|
import { Source, DocumentNode, GraphQLError } from 'graphql';
|
|
4
14
|
export { OperationTypeNode } from 'graphql';
|
|
5
15
|
import { GRAPHQL_AUTH_MODE } from '@aws-amplify/auth';
|