@aws-amplify/api-graphql 2.2.9 → 2.2.10-in-app-messaging.35
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 -334
- package/dist/aws-amplify-api-graphql.js +42 -434
- package/dist/aws-amplify-api-graphql.js.map +1 -1
- package/dist/aws-amplify-api-graphql.min.js +3 -3
- package/dist/aws-amplify-api-graphql.min.js.map +1 -1
- package/lib/.tsbuildinfo +1 -1
- package/lib/GraphQLAPI.d.ts +1 -1
- package/lib/GraphQLAPI.js +10 -11
- package/lib/GraphQLAPI.js.map +1 -1
- package/lib-esm/.tsbuildinfo +1 -1
- package/lib-esm/GraphQLAPI.d.ts +1 -1
- package/lib-esm/GraphQLAPI.js +3 -4
- package/lib-esm/GraphQLAPI.js.map +1 -1
- package/package.json +8 -8
- package/src/GraphQLAPI.ts +13 -10
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("aws_amplify_auth"), require("aws_amplify_cache"), require("aws_amplify_core"), require("graphql")
|
|
3
|
+
module.exports = factory(require("aws_amplify_auth"), require("aws_amplify_cache"), require("aws_amplify_core"), require("graphql"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define("aws_amplify_api-graphql", ["aws_amplify_auth", "aws_amplify_cache", "aws_amplify_core", "graphql"
|
|
5
|
+
define("aws_amplify_api-graphql", ["aws_amplify_auth", "aws_amplify_cache", "aws_amplify_core", "graphql"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["aws_amplify_api-graphql"] = factory(require("aws_amplify_auth"), require("aws_amplify_cache"), require("aws_amplify_core"), require("graphql")
|
|
7
|
+
exports["aws_amplify_api-graphql"] = factory(require("aws_amplify_auth"), require("aws_amplify_cache"), require("aws_amplify_core"), require("graphql"));
|
|
8
8
|
else
|
|
9
|
-
root["aws_amplify_api-graphql"] = factory(root["aws_amplify_auth"], root["aws_amplify_cache"], root["aws_amplify_core"], root["graphql"]
|
|
10
|
-
})(window, function(__WEBPACK_EXTERNAL_MODULE__aws_amplify_auth__, __WEBPACK_EXTERNAL_MODULE__aws_amplify_cache__, __WEBPACK_EXTERNAL_MODULE__aws_amplify_core__, __WEBPACK_EXTERNAL_MODULE_graphql__
|
|
9
|
+
root["aws_amplify_api-graphql"] = factory(root["aws_amplify_auth"], root["aws_amplify_cache"], root["aws_amplify_core"], root["graphql"]);
|
|
10
|
+
})(window, function(__WEBPACK_EXTERNAL_MODULE__aws_amplify_auth__, __WEBPACK_EXTERNAL_MODULE__aws_amplify_cache__, __WEBPACK_EXTERNAL_MODULE__aws_amplify_core__, __WEBPACK_EXTERNAL_MODULE_graphql__) {
|
|
11
11
|
return /******/ (function(modules) { // webpackBootstrap
|
|
12
12
|
/******/ // The module cache
|
|
13
13
|
/******/ var installedModules = {};
|
|
@@ -4152,371 +4152,6 @@ function isnan (val) {
|
|
|
4152
4152
|
|
|
4153
4153
|
/***/ }),
|
|
4154
4154
|
|
|
4155
|
-
/***/ "../../node_modules/graphql/error/GraphQLError.js":
|
|
4156
|
-
/*!*******************************************************************!*\
|
|
4157
|
-
!*** /root/amplify-js/node_modules/graphql/error/GraphQLError.js ***!
|
|
4158
|
-
\*******************************************************************/
|
|
4159
|
-
/*! no static exports found */
|
|
4160
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4161
|
-
|
|
4162
|
-
"use strict";
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4166
|
-
value: true
|
|
4167
|
-
});
|
|
4168
|
-
exports.GraphQLError = GraphQLError;
|
|
4169
|
-
|
|
4170
|
-
var _printError = __webpack_require__(/*! ./printError */ "../../node_modules/graphql/error/printError.js");
|
|
4171
|
-
|
|
4172
|
-
var _location = __webpack_require__(/*! ../language/location */ "../../node_modules/graphql/language/location.js");
|
|
4173
|
-
|
|
4174
|
-
/**
|
|
4175
|
-
* Copyright (c) 2015-present, Facebook, Inc.
|
|
4176
|
-
*
|
|
4177
|
-
* This source code is licensed under the MIT license found in the
|
|
4178
|
-
* LICENSE file in the root directory of this source tree.
|
|
4179
|
-
*
|
|
4180
|
-
* strict
|
|
4181
|
-
*/
|
|
4182
|
-
function GraphQLError( // eslint-disable-line no-redeclare
|
|
4183
|
-
message, nodes, source, positions, path, originalError, extensions) {
|
|
4184
|
-
// Compute list of blame nodes.
|
|
4185
|
-
var _nodes = Array.isArray(nodes) ? nodes.length !== 0 ? nodes : undefined : nodes ? [nodes] : undefined; // Compute locations in the source for the given nodes/positions.
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
var _source = source;
|
|
4189
|
-
|
|
4190
|
-
if (!_source && _nodes) {
|
|
4191
|
-
var node = _nodes[0];
|
|
4192
|
-
_source = node && node.loc && node.loc.source;
|
|
4193
|
-
}
|
|
4194
|
-
|
|
4195
|
-
var _positions = positions;
|
|
4196
|
-
|
|
4197
|
-
if (!_positions && _nodes) {
|
|
4198
|
-
_positions = _nodes.reduce(function (list, node) {
|
|
4199
|
-
if (node.loc) {
|
|
4200
|
-
list.push(node.loc.start);
|
|
4201
|
-
}
|
|
4202
|
-
|
|
4203
|
-
return list;
|
|
4204
|
-
}, []);
|
|
4205
|
-
}
|
|
4206
|
-
|
|
4207
|
-
if (_positions && _positions.length === 0) {
|
|
4208
|
-
_positions = undefined;
|
|
4209
|
-
}
|
|
4210
|
-
|
|
4211
|
-
var _locations;
|
|
4212
|
-
|
|
4213
|
-
if (positions && source) {
|
|
4214
|
-
_locations = positions.map(function (pos) {
|
|
4215
|
-
return (0, _location.getLocation)(source, pos);
|
|
4216
|
-
});
|
|
4217
|
-
} else if (_nodes) {
|
|
4218
|
-
_locations = _nodes.reduce(function (list, node) {
|
|
4219
|
-
if (node.loc) {
|
|
4220
|
-
list.push((0, _location.getLocation)(node.loc.source, node.loc.start));
|
|
4221
|
-
}
|
|
4222
|
-
|
|
4223
|
-
return list;
|
|
4224
|
-
}, []);
|
|
4225
|
-
}
|
|
4226
|
-
|
|
4227
|
-
var _extensions = extensions || originalError && originalError.extensions;
|
|
4228
|
-
|
|
4229
|
-
Object.defineProperties(this, {
|
|
4230
|
-
message: {
|
|
4231
|
-
value: message,
|
|
4232
|
-
// By being enumerable, JSON.stringify will include `message` in the
|
|
4233
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
4234
|
-
// service adheres to the spec.
|
|
4235
|
-
enumerable: true,
|
|
4236
|
-
writable: true
|
|
4237
|
-
},
|
|
4238
|
-
locations: {
|
|
4239
|
-
// Coercing falsey values to undefined ensures they will not be included
|
|
4240
|
-
// in JSON.stringify() when not provided.
|
|
4241
|
-
value: _locations || undefined,
|
|
4242
|
-
// By being enumerable, JSON.stringify will include `locations` in the
|
|
4243
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
4244
|
-
// service adheres to the spec.
|
|
4245
|
-
enumerable: Boolean(_locations)
|
|
4246
|
-
},
|
|
4247
|
-
path: {
|
|
4248
|
-
// Coercing falsey values to undefined ensures they will not be included
|
|
4249
|
-
// in JSON.stringify() when not provided.
|
|
4250
|
-
value: path || undefined,
|
|
4251
|
-
// By being enumerable, JSON.stringify will include `path` in the
|
|
4252
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
4253
|
-
// service adheres to the spec.
|
|
4254
|
-
enumerable: Boolean(path)
|
|
4255
|
-
},
|
|
4256
|
-
nodes: {
|
|
4257
|
-
value: _nodes || undefined
|
|
4258
|
-
},
|
|
4259
|
-
source: {
|
|
4260
|
-
value: _source || undefined
|
|
4261
|
-
},
|
|
4262
|
-
positions: {
|
|
4263
|
-
value: _positions || undefined
|
|
4264
|
-
},
|
|
4265
|
-
originalError: {
|
|
4266
|
-
value: originalError
|
|
4267
|
-
},
|
|
4268
|
-
extensions: {
|
|
4269
|
-
// Coercing falsey values to undefined ensures they will not be included
|
|
4270
|
-
// in JSON.stringify() when not provided.
|
|
4271
|
-
value: _extensions || undefined,
|
|
4272
|
-
// By being enumerable, JSON.stringify will include `path` in the
|
|
4273
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
4274
|
-
// service adheres to the spec.
|
|
4275
|
-
enumerable: Boolean(_extensions)
|
|
4276
|
-
}
|
|
4277
|
-
}); // Include (non-enumerable) stack trace.
|
|
4278
|
-
|
|
4279
|
-
if (originalError && originalError.stack) {
|
|
4280
|
-
Object.defineProperty(this, 'stack', {
|
|
4281
|
-
value: originalError.stack,
|
|
4282
|
-
writable: true,
|
|
4283
|
-
configurable: true
|
|
4284
|
-
});
|
|
4285
|
-
} else if (Error.captureStackTrace) {
|
|
4286
|
-
Error.captureStackTrace(this, GraphQLError);
|
|
4287
|
-
} else {
|
|
4288
|
-
Object.defineProperty(this, 'stack', {
|
|
4289
|
-
value: Error().stack,
|
|
4290
|
-
writable: true,
|
|
4291
|
-
configurable: true
|
|
4292
|
-
});
|
|
4293
|
-
}
|
|
4294
|
-
}
|
|
4295
|
-
|
|
4296
|
-
GraphQLError.prototype = Object.create(Error.prototype, {
|
|
4297
|
-
constructor: {
|
|
4298
|
-
value: GraphQLError
|
|
4299
|
-
},
|
|
4300
|
-
name: {
|
|
4301
|
-
value: 'GraphQLError'
|
|
4302
|
-
},
|
|
4303
|
-
toString: {
|
|
4304
|
-
value: function toString() {
|
|
4305
|
-
return (0, _printError.printError)(this);
|
|
4306
|
-
}
|
|
4307
|
-
}
|
|
4308
|
-
});
|
|
4309
|
-
|
|
4310
|
-
/***/ }),
|
|
4311
|
-
|
|
4312
|
-
/***/ "../../node_modules/graphql/error/printError.js":
|
|
4313
|
-
/*!*****************************************************************!*\
|
|
4314
|
-
!*** /root/amplify-js/node_modules/graphql/error/printError.js ***!
|
|
4315
|
-
\*****************************************************************/
|
|
4316
|
-
/*! no static exports found */
|
|
4317
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4318
|
-
|
|
4319
|
-
"use strict";
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4323
|
-
value: true
|
|
4324
|
-
});
|
|
4325
|
-
exports.printError = printError;
|
|
4326
|
-
|
|
4327
|
-
var _location = __webpack_require__(/*! ../language/location */ "../../node_modules/graphql/language/location.js");
|
|
4328
|
-
|
|
4329
|
-
/**
|
|
4330
|
-
* Copyright (c) 2015-present, Facebook, Inc.
|
|
4331
|
-
*
|
|
4332
|
-
* This source code is licensed under the MIT license found in the
|
|
4333
|
-
* LICENSE file in the root directory of this source tree.
|
|
4334
|
-
*
|
|
4335
|
-
* strict
|
|
4336
|
-
*/
|
|
4337
|
-
|
|
4338
|
-
/**
|
|
4339
|
-
* Prints a GraphQLError to a string, representing useful location information
|
|
4340
|
-
* about the error's position in the source.
|
|
4341
|
-
*/
|
|
4342
|
-
function printError(error) {
|
|
4343
|
-
var printedLocations = [];
|
|
4344
|
-
|
|
4345
|
-
if (error.nodes) {
|
|
4346
|
-
var _iteratorNormalCompletion = true;
|
|
4347
|
-
var _didIteratorError = false;
|
|
4348
|
-
var _iteratorError = undefined;
|
|
4349
|
-
|
|
4350
|
-
try {
|
|
4351
|
-
for (var _iterator = error.nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
4352
|
-
var node = _step.value;
|
|
4353
|
-
|
|
4354
|
-
if (node.loc) {
|
|
4355
|
-
printedLocations.push(highlightSourceAtLocation(node.loc.source, (0, _location.getLocation)(node.loc.source, node.loc.start)));
|
|
4356
|
-
}
|
|
4357
|
-
}
|
|
4358
|
-
} catch (err) {
|
|
4359
|
-
_didIteratorError = true;
|
|
4360
|
-
_iteratorError = err;
|
|
4361
|
-
} finally {
|
|
4362
|
-
try {
|
|
4363
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
4364
|
-
_iterator.return();
|
|
4365
|
-
}
|
|
4366
|
-
} finally {
|
|
4367
|
-
if (_didIteratorError) {
|
|
4368
|
-
throw _iteratorError;
|
|
4369
|
-
}
|
|
4370
|
-
}
|
|
4371
|
-
}
|
|
4372
|
-
} else if (error.source && error.locations) {
|
|
4373
|
-
var source = error.source;
|
|
4374
|
-
var _iteratorNormalCompletion2 = true;
|
|
4375
|
-
var _didIteratorError2 = false;
|
|
4376
|
-
var _iteratorError2 = undefined;
|
|
4377
|
-
|
|
4378
|
-
try {
|
|
4379
|
-
for (var _iterator2 = error.locations[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
4380
|
-
var location = _step2.value;
|
|
4381
|
-
printedLocations.push(highlightSourceAtLocation(source, location));
|
|
4382
|
-
}
|
|
4383
|
-
} catch (err) {
|
|
4384
|
-
_didIteratorError2 = true;
|
|
4385
|
-
_iteratorError2 = err;
|
|
4386
|
-
} finally {
|
|
4387
|
-
try {
|
|
4388
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
4389
|
-
_iterator2.return();
|
|
4390
|
-
}
|
|
4391
|
-
} finally {
|
|
4392
|
-
if (_didIteratorError2) {
|
|
4393
|
-
throw _iteratorError2;
|
|
4394
|
-
}
|
|
4395
|
-
}
|
|
4396
|
-
}
|
|
4397
|
-
}
|
|
4398
|
-
|
|
4399
|
-
return printedLocations.length === 0 ? error.message : [error.message].concat(printedLocations).join('\n\n') + '\n';
|
|
4400
|
-
}
|
|
4401
|
-
/**
|
|
4402
|
-
* Render a helpful description of the location of the error in the GraphQL
|
|
4403
|
-
* Source document.
|
|
4404
|
-
*/
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
function highlightSourceAtLocation(source, location) {
|
|
4408
|
-
var firstLineColumnOffset = source.locationOffset.column - 1;
|
|
4409
|
-
var body = whitespace(firstLineColumnOffset) + source.body;
|
|
4410
|
-
var lineIndex = location.line - 1;
|
|
4411
|
-
var lineOffset = source.locationOffset.line - 1;
|
|
4412
|
-
var lineNum = location.line + lineOffset;
|
|
4413
|
-
var columnOffset = location.line === 1 ? firstLineColumnOffset : 0;
|
|
4414
|
-
var columnNum = location.column + columnOffset;
|
|
4415
|
-
var lines = body.split(/\r\n|[\n\r]/g);
|
|
4416
|
-
return "".concat(source.name, " (").concat(lineNum, ":").concat(columnNum, ")\n") + printPrefixedLines([// Lines specified like this: ["prefix", "string"],
|
|
4417
|
-
["".concat(lineNum - 1, ": "), lines[lineIndex - 1]], ["".concat(lineNum, ": "), lines[lineIndex]], ['', whitespace(columnNum - 1) + '^'], ["".concat(lineNum + 1, ": "), lines[lineIndex + 1]]]);
|
|
4418
|
-
}
|
|
4419
|
-
|
|
4420
|
-
function printPrefixedLines(lines) {
|
|
4421
|
-
var existingLines = lines.filter(function (_ref) {
|
|
4422
|
-
var _ = _ref[0],
|
|
4423
|
-
line = _ref[1];
|
|
4424
|
-
return line !== undefined;
|
|
4425
|
-
});
|
|
4426
|
-
var padLen = 0;
|
|
4427
|
-
var _iteratorNormalCompletion3 = true;
|
|
4428
|
-
var _didIteratorError3 = false;
|
|
4429
|
-
var _iteratorError3 = undefined;
|
|
4430
|
-
|
|
4431
|
-
try {
|
|
4432
|
-
for (var _iterator3 = existingLines[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
4433
|
-
var _ref4 = _step3.value;
|
|
4434
|
-
var prefix = _ref4[0];
|
|
4435
|
-
padLen = Math.max(padLen, prefix.length);
|
|
4436
|
-
}
|
|
4437
|
-
} catch (err) {
|
|
4438
|
-
_didIteratorError3 = true;
|
|
4439
|
-
_iteratorError3 = err;
|
|
4440
|
-
} finally {
|
|
4441
|
-
try {
|
|
4442
|
-
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
|
4443
|
-
_iterator3.return();
|
|
4444
|
-
}
|
|
4445
|
-
} finally {
|
|
4446
|
-
if (_didIteratorError3) {
|
|
4447
|
-
throw _iteratorError3;
|
|
4448
|
-
}
|
|
4449
|
-
}
|
|
4450
|
-
}
|
|
4451
|
-
|
|
4452
|
-
return existingLines.map(function (_ref3) {
|
|
4453
|
-
var prefix = _ref3[0],
|
|
4454
|
-
line = _ref3[1];
|
|
4455
|
-
return lpad(padLen, prefix) + line;
|
|
4456
|
-
}).join('\n');
|
|
4457
|
-
}
|
|
4458
|
-
|
|
4459
|
-
function whitespace(len) {
|
|
4460
|
-
return Array(len + 1).join(' ');
|
|
4461
|
-
}
|
|
4462
|
-
|
|
4463
|
-
function lpad(len, str) {
|
|
4464
|
-
return whitespace(len - str.length) + str;
|
|
4465
|
-
}
|
|
4466
|
-
|
|
4467
|
-
/***/ }),
|
|
4468
|
-
|
|
4469
|
-
/***/ "../../node_modules/graphql/language/location.js":
|
|
4470
|
-
/*!******************************************************************!*\
|
|
4471
|
-
!*** /root/amplify-js/node_modules/graphql/language/location.js ***!
|
|
4472
|
-
\******************************************************************/
|
|
4473
|
-
/*! no static exports found */
|
|
4474
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4475
|
-
|
|
4476
|
-
"use strict";
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4480
|
-
value: true
|
|
4481
|
-
});
|
|
4482
|
-
exports.getLocation = getLocation;
|
|
4483
|
-
|
|
4484
|
-
/**
|
|
4485
|
-
* Copyright (c) 2015-present, Facebook, Inc.
|
|
4486
|
-
*
|
|
4487
|
-
* This source code is licensed under the MIT license found in the
|
|
4488
|
-
* LICENSE file in the root directory of this source tree.
|
|
4489
|
-
*
|
|
4490
|
-
* strict
|
|
4491
|
-
*/
|
|
4492
|
-
|
|
4493
|
-
/**
|
|
4494
|
-
* Represents a location in a Source.
|
|
4495
|
-
*/
|
|
4496
|
-
|
|
4497
|
-
/**
|
|
4498
|
-
* Takes a Source and a UTF-8 character offset, and returns the corresponding
|
|
4499
|
-
* line and column as a SourceLocation.
|
|
4500
|
-
*/
|
|
4501
|
-
function getLocation(source, position) {
|
|
4502
|
-
var lineRegexp = /\r\n|[\n\r]/g;
|
|
4503
|
-
var line = 1;
|
|
4504
|
-
var column = position + 1;
|
|
4505
|
-
var match;
|
|
4506
|
-
|
|
4507
|
-
while ((match = lineRegexp.exec(source.body)) && match.index < position) {
|
|
4508
|
-
line += 1;
|
|
4509
|
-
column = position + 1 - (match.index + match[0].length);
|
|
4510
|
-
}
|
|
4511
|
-
|
|
4512
|
-
return {
|
|
4513
|
-
line: line,
|
|
4514
|
-
column: column
|
|
4515
|
-
};
|
|
4516
|
-
}
|
|
4517
|
-
|
|
4518
|
-
/***/ }),
|
|
4519
|
-
|
|
4520
4155
|
/***/ "../../node_modules/ieee754/index.js":
|
|
4521
4156
|
/*!******************************************************!*\
|
|
4522
4157
|
!*** /root/amplify-js/node_modules/ieee754/index.js ***!
|
|
@@ -14409,21 +14044,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14409
14044
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "graphqlOperation", function() { return graphqlOperation; });
|
|
14410
14045
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraphQLAPIClass", function() { return GraphQLAPIClass; });
|
|
14411
14046
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraphQLAPI", function() { return GraphQLAPI; });
|
|
14412
|
-
/* harmony import */ var
|
|
14413
|
-
/* harmony import */ var
|
|
14414
|
-
/* harmony import */ var
|
|
14415
|
-
/* harmony import */ var
|
|
14416
|
-
/* harmony import */ var
|
|
14417
|
-
/* harmony import */ var
|
|
14418
|
-
/* harmony import */ var
|
|
14419
|
-
/* harmony import */ var
|
|
14420
|
-
/* harmony import */ var
|
|
14421
|
-
/* harmony import */ var
|
|
14422
|
-
/* harmony import */ var
|
|
14423
|
-
/* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @aws-amplify/cache */ "@aws-amplify/cache");
|
|
14424
|
-
/* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_cache__WEBPACK_IMPORTED_MODULE_6__);
|
|
14425
|
-
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./types */ "./lib-esm/types/index.js");
|
|
14426
|
-
/* harmony import */ var _aws_amplify_api_rest__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @aws-amplify/api-rest */ "../api-rest/lib-esm/index.js");
|
|
14047
|
+
/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphql */ "graphql");
|
|
14048
|
+
/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphql__WEBPACK_IMPORTED_MODULE_0__);
|
|
14049
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
14050
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
14051
|
+
/* harmony import */ var _aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/pubsub */ "../pubsub/lib-esm/index.js");
|
|
14052
|
+
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
|
|
14053
|
+
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__);
|
|
14054
|
+
/* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @aws-amplify/cache */ "@aws-amplify/cache");
|
|
14055
|
+
/* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_cache__WEBPACK_IMPORTED_MODULE_4__);
|
|
14056
|
+
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./types */ "./lib-esm/types/index.js");
|
|
14057
|
+
/* harmony import */ var _aws_amplify_api_rest__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @aws-amplify/api-rest */ "../api-rest/lib-esm/index.js");
|
|
14427
14058
|
var __assign = undefined && undefined.__assign || function () {
|
|
14428
14059
|
__assign = Object.assign || function (t) {
|
|
14429
14060
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -14643,10 +14274,8 @@ var __read = undefined && undefined.__read || function (o, n) {
|
|
|
14643
14274
|
|
|
14644
14275
|
|
|
14645
14276
|
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
14277
|
var USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
14649
|
-
var logger = new
|
|
14278
|
+
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('GraphQLAPI');
|
|
14650
14279
|
var graphqlOperation = function graphqlOperation(query, variables, authToken) {
|
|
14651
14280
|
if (variables === void 0) {
|
|
14652
14281
|
variables = {};
|
|
@@ -14671,9 +14300,9 @@ function () {
|
|
|
14671
14300
|
*/
|
|
14672
14301
|
function GraphQLAPIClass(options) {
|
|
14673
14302
|
this._api = null;
|
|
14674
|
-
this.Auth =
|
|
14675
|
-
this.Cache =
|
|
14676
|
-
this.Credentials =
|
|
14303
|
+
this.Auth = _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3___default.a;
|
|
14304
|
+
this.Cache = _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_4___default.a;
|
|
14305
|
+
this.Credentials = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"];
|
|
14677
14306
|
this._options = options;
|
|
14678
14307
|
logger.debug('API Options', this._options);
|
|
14679
14308
|
}
|
|
@@ -14726,7 +14355,7 @@ function () {
|
|
|
14726
14355
|
logger.debug('create Rest instance');
|
|
14727
14356
|
|
|
14728
14357
|
if (this._options) {
|
|
14729
|
-
this._api = new
|
|
14358
|
+
this._api = new _aws_amplify_api_rest__WEBPACK_IMPORTED_MODULE_6__["RestClient"](this._options); // Share instance Credentials with client for SSR
|
|
14730
14359
|
|
|
14731
14360
|
this._api.Credentials = this.Credentials;
|
|
14732
14361
|
return true;
|
|
@@ -14784,7 +14413,7 @@ function () {
|
|
|
14784
14413
|
|
|
14785
14414
|
case 1:
|
|
14786
14415
|
if (!apiKey) {
|
|
14787
|
-
throw new Error(
|
|
14416
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_API_KEY);
|
|
14788
14417
|
}
|
|
14789
14418
|
|
|
14790
14419
|
headers = {
|
|
@@ -14804,7 +14433,7 @@ function () {
|
|
|
14804
14433
|
credentialsOK = _c.sent();
|
|
14805
14434
|
|
|
14806
14435
|
if (!credentialsOK) {
|
|
14807
|
-
throw new Error(
|
|
14436
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_CREDENTIALS);
|
|
14808
14437
|
}
|
|
14809
14438
|
|
|
14810
14439
|
return [3
|
|
@@ -14817,7 +14446,7 @@ function () {
|
|
|
14817
14446
|
token = void 0;
|
|
14818
14447
|
return [4
|
|
14819
14448
|
/*yield*/
|
|
14820
|
-
,
|
|
14449
|
+
, _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_4___default.a.getItem('federatedInfo')];
|
|
14821
14450
|
|
|
14822
14451
|
case 5:
|
|
14823
14452
|
federatedInfo = _c.sent();
|
|
@@ -14832,7 +14461,7 @@ function () {
|
|
|
14832
14461
|
case 6:
|
|
14833
14462
|
return [4
|
|
14834
14463
|
/*yield*/
|
|
14835
|
-
,
|
|
14464
|
+
, _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3___default.a.currentAuthenticatedUser()];
|
|
14836
14465
|
|
|
14837
14466
|
case 7:
|
|
14838
14467
|
currentUser = _c.sent();
|
|
@@ -14845,7 +14474,7 @@ function () {
|
|
|
14845
14474
|
|
|
14846
14475
|
case 8:
|
|
14847
14476
|
if (!token) {
|
|
14848
|
-
throw new Error(
|
|
14477
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_FEDERATED_JWT);
|
|
14849
14478
|
}
|
|
14850
14479
|
|
|
14851
14480
|
headers = {
|
|
@@ -14857,7 +14486,7 @@ function () {
|
|
|
14857
14486
|
|
|
14858
14487
|
case 9:
|
|
14859
14488
|
e_1 = _c.sent();
|
|
14860
|
-
throw new Error(
|
|
14489
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_CURRENT_USER);
|
|
14861
14490
|
|
|
14862
14491
|
case 10:
|
|
14863
14492
|
return [3
|
|
@@ -14882,7 +14511,7 @@ function () {
|
|
|
14882
14511
|
|
|
14883
14512
|
case 13:
|
|
14884
14513
|
e_2 = _c.sent();
|
|
14885
|
-
throw new Error(
|
|
14514
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_CURRENT_USER);
|
|
14886
14515
|
|
|
14887
14516
|
case 14:
|
|
14888
14517
|
return [3
|
|
@@ -14891,7 +14520,7 @@ function () {
|
|
|
14891
14520
|
|
|
14892
14521
|
case 15:
|
|
14893
14522
|
if (!additionalHeaders.Authorization) {
|
|
14894
|
-
throw new Error(
|
|
14523
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_AUTH_TOKEN);
|
|
14895
14524
|
}
|
|
14896
14525
|
|
|
14897
14526
|
headers = {
|
|
@@ -14924,9 +14553,10 @@ function () {
|
|
|
14924
14553
|
|
|
14925
14554
|
|
|
14926
14555
|
GraphQLAPIClass.prototype.getGraphqlOperationType = function (operation) {
|
|
14927
|
-
var doc = Object(
|
|
14556
|
+
var doc = Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(operation);
|
|
14557
|
+
var definitions = doc.definitions;
|
|
14928
14558
|
|
|
14929
|
-
var _a = __read(
|
|
14559
|
+
var _a = __read(definitions, 1),
|
|
14930
14560
|
operationType = _a[0].operation;
|
|
14931
14561
|
|
|
14932
14562
|
return operationType;
|
|
@@ -14946,7 +14576,7 @@ function () {
|
|
|
14946
14576
|
variables = _b === void 0 ? {} : _b,
|
|
14947
14577
|
authMode = _a.authMode,
|
|
14948
14578
|
authToken = _a.authToken;
|
|
14949
|
-
var query = typeof paramQuery === 'string' ? Object(
|
|
14579
|
+
var query = typeof paramQuery === 'string' ? Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(paramQuery) : Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(Object(graphql__WEBPACK_IMPORTED_MODULE_0__["print"])(paramQuery));
|
|
14950
14580
|
|
|
14951
14581
|
var _c = __read(query.definitions.filter(function (def) {
|
|
14952
14582
|
return def.kind === 'OperationDefinition';
|
|
@@ -15080,9 +14710,9 @@ function () {
|
|
|
15080
14710
|
})];
|
|
15081
14711
|
|
|
15082
14712
|
case 9:
|
|
15083
|
-
headers = __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _j.concat([_l.sent()])), additionalHeaders]), !customGraphqlEndpoint && (_k = {}, _k[USER_AGENT_HEADER] =
|
|
14713
|
+
headers = __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _j.concat([_l.sent()])), additionalHeaders]), !customGraphqlEndpoint && (_k = {}, _k[USER_AGENT_HEADER] = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Constants"].userAgent, _k)]);
|
|
15084
14714
|
body = {
|
|
15085
|
-
query: Object(
|
|
14715
|
+
query: Object(graphql__WEBPACK_IMPORTED_MODULE_0__["print"])(query),
|
|
15086
14716
|
variables: variables
|
|
15087
14717
|
};
|
|
15088
14718
|
init = Object.assign({
|
|
@@ -15096,7 +14726,7 @@ function () {
|
|
|
15096
14726
|
endpoint = customGraphqlEndpoint || appSyncGraphqlEndpoint;
|
|
15097
14727
|
|
|
15098
14728
|
if (!endpoint) {
|
|
15099
|
-
error = new
|
|
14729
|
+
error = new graphql__WEBPACK_IMPORTED_MODULE_0__["GraphQLError"]('No graphql endpoint provided.');
|
|
15100
14730
|
throw {
|
|
15101
14731
|
data: {},
|
|
15102
14732
|
errors: [error]
|
|
@@ -15129,7 +14759,7 @@ function () {
|
|
|
15129
14759
|
|
|
15130
14760
|
response = {
|
|
15131
14761
|
data: {},
|
|
15132
|
-
errors: [new
|
|
14762
|
+
errors: [new graphql__WEBPACK_IMPORTED_MODULE_0__["GraphQLError"](err_1.message, null, null, null, null, err_1)]
|
|
15133
14763
|
};
|
|
15134
14764
|
return [3
|
|
15135
14765
|
/*break*/
|
|
@@ -15191,13 +14821,13 @@ function () {
|
|
|
15191
14821
|
} : _c;
|
|
15192
14822
|
var authenticationType = defaultAuthenticationType || aws_appsync_authenticationType || 'AWS_IAM';
|
|
15193
14823
|
|
|
15194
|
-
if (
|
|
15195
|
-
return
|
|
15196
|
-
provider:
|
|
14824
|
+
if (_aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["default"] && typeof _aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["default"].subscribe === 'function') {
|
|
14825
|
+
return _aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["default"].subscribe('', {
|
|
14826
|
+
provider: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER"],
|
|
15197
14827
|
appSyncGraphqlEndpoint: appSyncGraphqlEndpoint,
|
|
15198
14828
|
authenticationType: authenticationType,
|
|
15199
14829
|
apiKey: apiKey,
|
|
15200
|
-
query: Object(
|
|
14830
|
+
query: Object(graphql__WEBPACK_IMPORTED_MODULE_0__["print"])(query),
|
|
15201
14831
|
region: region,
|
|
15202
14832
|
variables: variables,
|
|
15203
14833
|
graphql_headers: graphql_headers,
|
|
@@ -15235,7 +14865,7 @@ function () {
|
|
|
15235
14865
|
|
|
15236
14866
|
|
|
15237
14867
|
var GraphQLAPI = new GraphQLAPIClass(null);
|
|
15238
|
-
|
|
14868
|
+
_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].register(GraphQLAPI);
|
|
15239
14869
|
|
|
15240
14870
|
/***/ }),
|
|
15241
14871
|
|
|
@@ -15355,28 +14985,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__aws_amplify_core__;
|
|
|
15355
14985
|
|
|
15356
14986
|
module.exports = __WEBPACK_EXTERNAL_MODULE_graphql__;
|
|
15357
14987
|
|
|
15358
|
-
/***/ }),
|
|
15359
|
-
|
|
15360
|
-
/***/ "graphql/language/parser":
|
|
15361
|
-
/*!******************************************!*\
|
|
15362
|
-
!*** external "graphql/language/parser" ***!
|
|
15363
|
-
\******************************************/
|
|
15364
|
-
/*! no static exports found */
|
|
15365
|
-
/***/ (function(module, exports) {
|
|
15366
|
-
|
|
15367
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_graphql_language_parser__;
|
|
15368
|
-
|
|
15369
|
-
/***/ }),
|
|
15370
|
-
|
|
15371
|
-
/***/ "graphql/language/printer":
|
|
15372
|
-
/*!*******************************************!*\
|
|
15373
|
-
!*** external "graphql/language/printer" ***!
|
|
15374
|
-
\*******************************************/
|
|
15375
|
-
/*! no static exports found */
|
|
15376
|
-
/***/ (function(module, exports) {
|
|
15377
|
-
|
|
15378
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_graphql_language_printer__;
|
|
15379
|
-
|
|
15380
14988
|
/***/ })
|
|
15381
14989
|
|
|
15382
14990
|
/******/ });
|