@salesforce/lds-worker-api 1.315.0 → 1.316.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4265,7 +4265,7 @@ function withDefaultLuvio(callback) {
4265
4265
  }
4266
4266
  callbacks.push(callback);
4267
4267
  }
4268
- // version: 1.315.0-8ef4c90baf
4268
+ // version: 1.316.0-fd56ed976d
4269
4269
 
4270
4270
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
4271
4271
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -5213,7 +5213,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
5213
5213
  const { apiFamily, name } = metadata;
5214
5214
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
5215
5215
  }
5216
- // version: 1.315.0-8ef4c90baf
5216
+ // version: 1.316.0-fd56ed976d
5217
5217
 
5218
5218
  /**
5219
5219
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -6050,6 +6050,13 @@ function difference$1(source, compare) {
6050
6050
  }
6051
6051
  return strings;
6052
6052
  }
6053
+ /**
6054
+ * @param word The string to title case
6055
+ * @returns The sames string but in title case
6056
+ */
6057
+ function toTitleCase(word) {
6058
+ return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
6059
+ }
6053
6060
 
6054
6061
  function isObjectId$3(unknown) {
6055
6062
  if (typeof unknown !== 'object' || unknown === null) {
@@ -6729,6 +6736,17 @@ function getRecordId18$1(value) {
6729
6736
  return undefined;
6730
6737
  }
6731
6738
 
6739
+ // Copy of SortedStringArray but calls toTitleCase
6740
+ function toSortedStringArrayTitleCase(value) {
6741
+ const valueArray = isArray$7(value) ? value : [value];
6742
+ if (valueArray.length !== 0 && isArrayOfNonEmptyStrings$1(valueArray)) {
6743
+ return dedupe$3(valueArray)
6744
+ .sort()
6745
+ .map((value) => toTitleCase(value));
6746
+ }
6747
+ return undefined;
6748
+ }
6749
+
6732
6750
  function toSortedStringArray$1(value) {
6733
6751
  const valueArray = isArray$7(value) ? value : [value];
6734
6752
  if (valueArray.length !== 0 && isArrayOfNonEmptyStrings$1(valueArray)) {
@@ -9980,7 +9998,7 @@ const getRecord_ConfigPropertyMetadata$1 = [
9980
9998
  generateParamConfigMetadata$3('childRelationships', false, 1 /* QueryParameter */, 0 /* String */, true),
9981
9999
  generateParamConfigMetadata$3('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray$3),
9982
10000
  generateParamConfigMetadata$3('forms', false, 1 /* QueryParameter */, 0 /* String */, true),
9983
- generateParamConfigMetadata$3('layoutTypes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArray$1),
10001
+ generateParamConfigMetadata$3('layoutTypes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArrayTitleCase),
9984
10002
  generateParamConfigMetadata$3('modes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArray$1),
9985
10003
  generateParamConfigMetadata$3('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray$3),
9986
10004
  generateParamConfigMetadata$3('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
@@ -14266,7 +14284,7 @@ const getRecordUi_ConfigPropertyMetadata$1 = [
14266
14284
  generateParamConfigMetadata$3('recordIds', true, 0 /* UrlParameter */, 0 /* String */, true, getRecordId18Array$1),
14267
14285
  generateParamConfigMetadata$3('childRelationships', false, 1 /* QueryParameter */, 0 /* String */, true),
14268
14286
  generateParamConfigMetadata$3('formFactor', false, 1 /* QueryParameter */, 0 /* String */),
14269
- generateParamConfigMetadata$3('layoutTypes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArray$1),
14287
+ generateParamConfigMetadata$3('layoutTypes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArrayTitleCase),
14270
14288
  generateParamConfigMetadata$3('modes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArray$1),
14271
14289
  generateParamConfigMetadata$3('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray$3),
14272
14290
  generateParamConfigMetadata$3('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
@@ -30519,7 +30537,8 @@ function getTypeCacheKeys$7$2(rootKeySet, luvio, input, fullPathFactory) {
30519
30537
  }
30520
30538
 
30521
30539
  function keyBuilder$8$2(luvio, params) {
30522
- return keyPrefix$3 + '::LookupValuesRepresentation:(' + 'dependentFieldBindings:' + params.queryParams.dependentFieldBindings + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'q:' + params.queryParams.q + ',' + 'searchType:' + params.queryParams.searchType + ',' + 'sourceRecordId:' + params.queryParams.sourceRecordId + ',' + 'targetApiName:' + params.queryParams.targetApiName + ',' + 'fieldApiName:' + params.urlParams.fieldApiName + ',' + 'objectApiName:' + params.urlParams.objectApiName + ',' + (params.body.sourceRecord === undefined ? 'sourceRecord' : 'sourceRecord:' + params.body.sourceRecord) + ')';
30540
+ var _a, _b, _c, _d, _e;
30541
+ return keyPrefix$3 + '::LookupValuesRepresentation:(' + 'dependentFieldBindings:' + params.queryParams.dependentFieldBindings + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'q:' + params.queryParams.q + ',' + 'searchType:' + params.queryParams.searchType + ',' + 'sourceRecordId:' + params.queryParams.sourceRecordId + ',' + 'targetApiName:' + params.queryParams.targetApiName + ',' + 'fieldApiName:' + params.urlParams.fieldApiName + ',' + 'objectApiName:' + params.urlParams.objectApiName + ',' + (((_a = params.body.sourceRecord) === null || _a === void 0 ? void 0 : _a.allowSaveOnDuplicate) === undefined ? 'sourceRecord.allowSaveOnDuplicate' : 'sourceRecord.allowSaveOnDuplicate:' + ((_b = params.body.sourceRecord) === null || _b === void 0 ? void 0 : _b.allowSaveOnDuplicate)) + '::' + (((_c = params.body.sourceRecord) === null || _c === void 0 ? void 0 : _c.apiName) === undefined ? 'sourceRecord.apiName' : 'sourceRecord.apiName:' + ((_d = params.body.sourceRecord) === null || _d === void 0 ? void 0 : _d.apiName)) + '::' + stableJSONStringify$2((_e = params.body.sourceRecord) === null || _e === void 0 ? void 0 : _e.fields) + '::' + (params.body.orderBy === undefined ? undefined : ('[' + params.body.orderBy.map(element => 'orderBy.fieldApiName:' + element.fieldApiName + '::' + 'orderBy.isAscending:' + element.isAscending).join(',') + ']')) + ')';
30523
30542
  }
30524
30543
  function getResponseCacheKeys$7$1(storeKeyMap, luvio, resourceParams, response) {
30525
30544
  getTypeCacheKeys$7$2(storeKeyMap, luvio, response, () => keyBuilder$8$2(luvio, resourceParams));
@@ -30549,6 +30568,7 @@ const getLookupRecords_ConfigPropertyMetadata$1 = [
30549
30568
  generateParamConfigMetadata$3('sourceRecordId', false, 1 /* QueryParameter */, 0 /* String */),
30550
30569
  generateParamConfigMetadata$3('targetApiName', false, 1 /* QueryParameter */, 0 /* String */),
30551
30570
  generateParamConfigMetadata$3('sourceRecord', false, 2 /* Body */, 4 /* Unsupported */),
30571
+ generateParamConfigMetadata$3('orderBy', false, 2 /* Body */, 4 /* Unsupported */, true),
30552
30572
  ];
30553
30573
  function typeCheckConfig$a$1(untrustedConfig) {
30554
30574
  const config = {};
@@ -30558,8 +30578,17 @@ function typeCheckConfig$a$1(untrustedConfig) {
30558
30578
  if (referenceRecordInputRepresentationValidationError === null) {
30559
30579
  config.sourceRecord = untrustedConfig_sourceRecord;
30560
30580
  }
30561
- if (untrustedConfig_sourceRecord === null) {
30562
- config.sourceRecord = untrustedConfig_sourceRecord;
30581
+ const untrustedConfig_orderBy = untrustedConfig.orderBy;
30582
+ if (ArrayIsArray$1$1(untrustedConfig_orderBy)) {
30583
+ const untrustedConfig_orderBy_array = [];
30584
+ for (let i = 0, arrayLength = untrustedConfig_orderBy.length; i < arrayLength; i++) {
30585
+ const untrustedConfig_orderBy_item = untrustedConfig_orderBy[i];
30586
+ const referenceListOrderedByInfoInputRepresentationValidationError = validate$10(untrustedConfig_orderBy_item);
30587
+ if (referenceListOrderedByInfoInputRepresentationValidationError === null) {
30588
+ untrustedConfig_orderBy_array.push(untrustedConfig_orderBy_item);
30589
+ }
30590
+ }
30591
+ config.orderBy = untrustedConfig_orderBy_array;
30563
30592
  }
30564
30593
  return config;
30565
30594
  }
@@ -30620,6 +30649,10 @@ function coerceRequestParams$1(untrusted) {
30620
30649
  if (sourceRecord !== undefined) {
30621
30650
  coercedConfig.sourceRecord = sourceRecord;
30622
30651
  }
30652
+ const orderBy = requestParams.orderBy;
30653
+ if (orderBy !== undefined) {
30654
+ coercedConfig.orderBy = orderBy;
30655
+ }
30623
30656
  return coercedConfig;
30624
30657
  }
30625
30658
  function coerceConfigWithDefaults$1$1(untrusted) {
@@ -30669,6 +30702,7 @@ function buildNetworkSnapshot$8$1(luvio, config, options) {
30669
30702
  },
30670
30703
  body: {
30671
30704
  sourceRecord: config.sourceRecord,
30705
+ orderBy: config.orderBy,
30672
30706
  },
30673
30707
  };
30674
30708
  const request = createResourceRequest$a$1(resourceParams);
@@ -33711,7 +33745,7 @@ withDefaultLuvio((luvio) => {
33711
33745
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
33712
33746
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
33713
33747
  });
33714
- // version: 1.315.0-b7eff13c6d
33748
+ // version: 1.316.0-4453f1e2b6
33715
33749
 
33716
33750
  var ldsIdempotencyWriteDisabled = {
33717
33751
  isOpen: function (e) {
@@ -34152,7 +34186,7 @@ var Kind$1 = Object.freeze({
34152
34186
  * The enum type representing the possible kind values of AST nodes.
34153
34187
  */
34154
34188
 
34155
- function invariant(condition, message) {
34189
+ function invariant$1(condition, message) {
34156
34190
  var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
34157
34191
 
34158
34192
  if (!booleanCondition) {
@@ -34161,20 +34195,20 @@ function invariant(condition, message) {
34161
34195
  }
34162
34196
 
34163
34197
  // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
34164
- var nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;
34165
- var nodejsCustomInspectSymbol$1 = nodejsCustomInspectSymbol;
34198
+ var nodejsCustomInspectSymbol$2 = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;
34199
+ var nodejsCustomInspectSymbol$1$1 = nodejsCustomInspectSymbol$2;
34166
34200
 
34167
34201
  /**
34168
34202
  * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON`
34169
34203
  */
34170
34204
 
34171
- function defineInspect(classObject) {
34205
+ function defineInspect$1(classObject) {
34172
34206
  var fn = classObject.prototype.toJSON;
34173
- typeof fn === 'function' || invariant(0);
34207
+ typeof fn === 'function' || invariant$1(0);
34174
34208
  classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')
34175
34209
 
34176
- if (nodejsCustomInspectSymbol$1) {
34177
- classObject.prototype[nodejsCustomInspectSymbol$1] = fn;
34210
+ if (nodejsCustomInspectSymbol$1$1) {
34211
+ classObject.prototype[nodejsCustomInspectSymbol$1$1] = fn;
34178
34212
  }
34179
34213
  }
34180
34214
 
@@ -34182,7 +34216,7 @@ function defineInspect(classObject) {
34182
34216
  * Contains a range of UTF-8 character offsets and token references that
34183
34217
  * identify the region of the source from which the AST derived.
34184
34218
  */
34185
- var Location = /*#__PURE__*/function () {
34219
+ var Location$1 = /*#__PURE__*/function () {
34186
34220
  /**
34187
34221
  * The character offset at which this Node begins.
34188
34222
  */
@@ -34222,13 +34256,13 @@ var Location = /*#__PURE__*/function () {
34222
34256
  return Location;
34223
34257
  }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
34224
34258
 
34225
- defineInspect(Location);
34259
+ defineInspect$1(Location$1);
34226
34260
  /**
34227
34261
  * Represents a range of characters represented by a lexical token
34228
34262
  * within a Source.
34229
34263
  */
34230
34264
 
34231
- var Token = /*#__PURE__*/function () {
34265
+ var Token$1 = /*#__PURE__*/function () {
34232
34266
  /**
34233
34267
  * The kind of Token.
34234
34268
  */
@@ -34283,12 +34317,12 @@ var Token = /*#__PURE__*/function () {
34283
34317
  return Token;
34284
34318
  }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
34285
34319
 
34286
- defineInspect(Token);
34320
+ defineInspect$1(Token$1);
34287
34321
  /**
34288
34322
  * @internal
34289
34323
  */
34290
34324
 
34291
- function isNode(maybeNode) {
34325
+ function isNode$1(maybeNode) {
34292
34326
  return maybeNode != null && typeof maybeNode.kind === 'string';
34293
34327
  }
34294
34328
  /**
@@ -34328,17 +34362,17 @@ var TokenKind = Object.freeze({
34328
34362
  */
34329
34363
 
34330
34364
  function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
34331
- var MAX_ARRAY_LENGTH = 10;
34332
- var MAX_RECURSIVE_DEPTH = 2;
34365
+ var MAX_ARRAY_LENGTH$1 = 10;
34366
+ var MAX_RECURSIVE_DEPTH$1 = 2;
34333
34367
  /**
34334
34368
  * Used to print values in error messages.
34335
34369
  */
34336
34370
 
34337
- function inspect(value) {
34338
- return formatValue(value, []);
34371
+ function inspect$1(value) {
34372
+ return formatValue$1(value, []);
34339
34373
  }
34340
34374
 
34341
- function formatValue(value, seenValues) {
34375
+ function formatValue$1(value, seenValues) {
34342
34376
  switch (_typeof$2(value)) {
34343
34377
  case 'string':
34344
34378
  return JSON.stringify(value);
@@ -34351,67 +34385,67 @@ function formatValue(value, seenValues) {
34351
34385
  return 'null';
34352
34386
  }
34353
34387
 
34354
- return formatObjectValue(value, seenValues);
34388
+ return formatObjectValue$1(value, seenValues);
34355
34389
 
34356
34390
  default:
34357
34391
  return String(value);
34358
34392
  }
34359
34393
  }
34360
34394
 
34361
- function formatObjectValue(value, previouslySeenValues) {
34395
+ function formatObjectValue$1(value, previouslySeenValues) {
34362
34396
  if (previouslySeenValues.indexOf(value) !== -1) {
34363
34397
  return '[Circular]';
34364
34398
  }
34365
34399
 
34366
34400
  var seenValues = [].concat(previouslySeenValues, [value]);
34367
- var customInspectFn = getCustomFn(value);
34401
+ var customInspectFn = getCustomFn$1(value);
34368
34402
 
34369
34403
  if (customInspectFn !== undefined) {
34370
34404
  var customValue = customInspectFn.call(value); // check for infinite recursion
34371
34405
 
34372
34406
  if (customValue !== value) {
34373
- return typeof customValue === 'string' ? customValue : formatValue(customValue, seenValues);
34407
+ return typeof customValue === 'string' ? customValue : formatValue$1(customValue, seenValues);
34374
34408
  }
34375
34409
  } else if (Array.isArray(value)) {
34376
- return formatArray(value, seenValues);
34410
+ return formatArray$1(value, seenValues);
34377
34411
  }
34378
34412
 
34379
- return formatObject(value, seenValues);
34413
+ return formatObject$1(value, seenValues);
34380
34414
  }
34381
34415
 
34382
- function formatObject(object, seenValues) {
34416
+ function formatObject$1(object, seenValues) {
34383
34417
  var keys = Object.keys(object);
34384
34418
 
34385
34419
  if (keys.length === 0) {
34386
34420
  return '{}';
34387
34421
  }
34388
34422
 
34389
- if (seenValues.length > MAX_RECURSIVE_DEPTH) {
34390
- return '[' + getObjectTag(object) + ']';
34423
+ if (seenValues.length > MAX_RECURSIVE_DEPTH$1) {
34424
+ return '[' + getObjectTag$1(object) + ']';
34391
34425
  }
34392
34426
 
34393
34427
  var properties = keys.map(function (key) {
34394
- var value = formatValue(object[key], seenValues);
34428
+ var value = formatValue$1(object[key], seenValues);
34395
34429
  return key + ': ' + value;
34396
34430
  });
34397
34431
  return '{ ' + properties.join(', ') + ' }';
34398
34432
  }
34399
34433
 
34400
- function formatArray(array, seenValues) {
34434
+ function formatArray$1(array, seenValues) {
34401
34435
  if (array.length === 0) {
34402
34436
  return '[]';
34403
34437
  }
34404
34438
 
34405
- if (seenValues.length > MAX_RECURSIVE_DEPTH) {
34439
+ if (seenValues.length > MAX_RECURSIVE_DEPTH$1) {
34406
34440
  return '[Array]';
34407
34441
  }
34408
34442
 
34409
- var len = Math.min(MAX_ARRAY_LENGTH, array.length);
34443
+ var len = Math.min(MAX_ARRAY_LENGTH$1, array.length);
34410
34444
  var remaining = array.length - len;
34411
34445
  var items = [];
34412
34446
 
34413
34447
  for (var i = 0; i < len; ++i) {
34414
- items.push(formatValue(array[i], seenValues));
34448
+ items.push(formatValue$1(array[i], seenValues));
34415
34449
  }
34416
34450
 
34417
34451
  if (remaining === 1) {
@@ -34423,8 +34457,8 @@ function formatArray(array, seenValues) {
34423
34457
  return '[' + items.join(', ') + ']';
34424
34458
  }
34425
34459
 
34426
- function getCustomFn(object) {
34427
- var customInspectFn = object[String(nodejsCustomInspectSymbol$1)];
34460
+ function getCustomFn$1(object) {
34461
+ var customInspectFn = object[String(nodejsCustomInspectSymbol$1$1)];
34428
34462
 
34429
34463
  if (typeof customInspectFn === 'function') {
34430
34464
  return customInspectFn;
@@ -34435,7 +34469,7 @@ function getCustomFn(object) {
34435
34469
  }
34436
34470
  }
34437
34471
 
34438
- function getObjectTag(object) {
34472
+ function getObjectTag$1(object) {
34439
34473
  var tag = Object.prototype.toString.call(object).replace(/^\[object /, '').replace(/]$/, '');
34440
34474
 
34441
34475
  if (tag === 'Object' && typeof object.constructor === 'function') {
@@ -34487,7 +34521,7 @@ var Source = /*#__PURE__*/function () {
34487
34521
  line: 1,
34488
34522
  column: 1
34489
34523
  };
34490
- typeof body === 'string' || devAssert(0, "Body must be a string. Received: ".concat(inspect(body), "."));
34524
+ typeof body === 'string' || devAssert(0, "Body must be a string. Received: ".concat(inspect$1(body), "."));
34491
34525
  this.body = body;
34492
34526
  this.name = name;
34493
34527
  this.locationOffset = locationOffset;
@@ -34697,7 +34731,7 @@ var Lexer = /*#__PURE__*/function () {
34697
34731
  * The character offset at which the current line begins.
34698
34732
  */
34699
34733
  function Lexer(source) {
34700
- var startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0, null);
34734
+ var startOfFileToken = new Token$1(TokenKind.SOF, 0, 0, 0, 0, null);
34701
34735
  this.source = source;
34702
34736
  this.lastToken = startOfFileToken;
34703
34737
  this.token = startOfFileToken;
@@ -34809,7 +34843,7 @@ function readToken(lexer, prev) {
34809
34843
 
34810
34844
  case 33:
34811
34845
  // !
34812
- return new Token(TokenKind.BANG, pos, pos + 1, _line, _col, prev);
34846
+ return new Token$1(TokenKind.BANG, pos, pos + 1, _line, _col, prev);
34813
34847
 
34814
34848
  case 35:
34815
34849
  // #
@@ -34817,59 +34851,59 @@ function readToken(lexer, prev) {
34817
34851
 
34818
34852
  case 36:
34819
34853
  // $
34820
- return new Token(TokenKind.DOLLAR, pos, pos + 1, _line, _col, prev);
34854
+ return new Token$1(TokenKind.DOLLAR, pos, pos + 1, _line, _col, prev);
34821
34855
 
34822
34856
  case 38:
34823
34857
  // &
34824
- return new Token(TokenKind.AMP, pos, pos + 1, _line, _col, prev);
34858
+ return new Token$1(TokenKind.AMP, pos, pos + 1, _line, _col, prev);
34825
34859
 
34826
34860
  case 40:
34827
34861
  // (
34828
- return new Token(TokenKind.PAREN_L, pos, pos + 1, _line, _col, prev);
34862
+ return new Token$1(TokenKind.PAREN_L, pos, pos + 1, _line, _col, prev);
34829
34863
 
34830
34864
  case 41:
34831
34865
  // )
34832
- return new Token(TokenKind.PAREN_R, pos, pos + 1, _line, _col, prev);
34866
+ return new Token$1(TokenKind.PAREN_R, pos, pos + 1, _line, _col, prev);
34833
34867
 
34834
34868
  case 46:
34835
34869
  // .
34836
34870
  if (body.charCodeAt(pos + 1) === 46 && body.charCodeAt(pos + 2) === 46) {
34837
- return new Token(TokenKind.SPREAD, pos, pos + 3, _line, _col, prev);
34871
+ return new Token$1(TokenKind.SPREAD, pos, pos + 3, _line, _col, prev);
34838
34872
  }
34839
34873
 
34840
34874
  break;
34841
34875
 
34842
34876
  case 58:
34843
34877
  // :
34844
- return new Token(TokenKind.COLON, pos, pos + 1, _line, _col, prev);
34878
+ return new Token$1(TokenKind.COLON, pos, pos + 1, _line, _col, prev);
34845
34879
 
34846
34880
  case 61:
34847
34881
  // =
34848
- return new Token(TokenKind.EQUALS, pos, pos + 1, _line, _col, prev);
34882
+ return new Token$1(TokenKind.EQUALS, pos, pos + 1, _line, _col, prev);
34849
34883
 
34850
34884
  case 64:
34851
34885
  // @
34852
- return new Token(TokenKind.AT, pos, pos + 1, _line, _col, prev);
34886
+ return new Token$1(TokenKind.AT, pos, pos + 1, _line, _col, prev);
34853
34887
 
34854
34888
  case 91:
34855
34889
  // [
34856
- return new Token(TokenKind.BRACKET_L, pos, pos + 1, _line, _col, prev);
34890
+ return new Token$1(TokenKind.BRACKET_L, pos, pos + 1, _line, _col, prev);
34857
34891
 
34858
34892
  case 93:
34859
34893
  // ]
34860
- return new Token(TokenKind.BRACKET_R, pos, pos + 1, _line, _col, prev);
34894
+ return new Token$1(TokenKind.BRACKET_R, pos, pos + 1, _line, _col, prev);
34861
34895
 
34862
34896
  case 123:
34863
34897
  // {
34864
- return new Token(TokenKind.BRACE_L, pos, pos + 1, _line, _col, prev);
34898
+ return new Token$1(TokenKind.BRACE_L, pos, pos + 1, _line, _col, prev);
34865
34899
 
34866
34900
  case 124:
34867
34901
  // |
34868
- return new Token(TokenKind.PIPE, pos, pos + 1, _line, _col, prev);
34902
+ return new Token$1(TokenKind.PIPE, pos, pos + 1, _line, _col, prev);
34869
34903
 
34870
34904
  case 125:
34871
34905
  // }
34872
- return new Token(TokenKind.BRACE_R, pos, pos + 1, _line, _col, prev);
34906
+ return new Token$1(TokenKind.BRACE_R, pos, pos + 1, _line, _col, prev);
34873
34907
 
34874
34908
  case 34:
34875
34909
  // "
@@ -35017,7 +35051,7 @@ function readToken(lexer, prev) {
35017
35051
 
35018
35052
  var line = lexer.line;
35019
35053
  var col = 1 + pos - lexer.lineStart;
35020
- return new Token(TokenKind.EOF, bodyLength, bodyLength, line, col, prev);
35054
+ return new Token$1(TokenKind.EOF, bodyLength, bodyLength, line, col, prev);
35021
35055
  }
35022
35056
  /**
35023
35057
  * Report a message that an unexpected character was encountered.
@@ -35053,7 +35087,7 @@ function readComment(source, start, line, col, prev) {
35053
35087
  } while (!isNaN(code) && ( // SourceCharacter but not LineTerminator
35054
35088
  code > 0x001f || code === 0x0009));
35055
35089
 
35056
- return new Token(TokenKind.COMMENT, start, position, line, col, prev, body.slice(start + 1, position));
35090
+ return new Token$1(TokenKind.COMMENT, start, position, line, col, prev, body.slice(start + 1, position));
35057
35091
  }
35058
35092
  /**
35059
35093
  * Reads a number token from the source file, either a float
@@ -35114,7 +35148,7 @@ function readNumber(source, start, firstCode, line, col, prev) {
35114
35148
  throw syntaxError(source, position, "Invalid number, expected digit but got: ".concat(printCharCode(code), "."));
35115
35149
  }
35116
35150
 
35117
- return new Token(isFloat ? TokenKind.FLOAT : TokenKind.INT, start, position, line, col, prev, body.slice(start, position));
35151
+ return new Token$1(isFloat ? TokenKind.FLOAT : TokenKind.INT, start, position, line, col, prev, body.slice(start, position));
35118
35152
  }
35119
35153
  /**
35120
35154
  * Returns the new position in the source after reading digits.
@@ -35157,7 +35191,7 @@ function readString(source, start, line, col, prev) {
35157
35191
  // Closing Quote (")
35158
35192
  if (code === 34) {
35159
35193
  value += body.slice(chunkStart, position);
35160
- return new Token(TokenKind.STRING, start, position + 1, line, col, prev, value);
35194
+ return new Token$1(TokenKind.STRING, start, position + 1, line, col, prev, value);
35161
35195
  } // SourceCharacter
35162
35196
 
35163
35197
 
@@ -35249,7 +35283,7 @@ function readBlockString(source, start, line, col, prev, lexer) {
35249
35283
  // Closing Triple-Quote (""")
35250
35284
  if (code === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) {
35251
35285
  rawValue += body.slice(chunkStart, position);
35252
- return new Token(TokenKind.BLOCK_STRING, start, position + 3, line, col, prev, dedentBlockStringValue(rawValue));
35286
+ return new Token$1(TokenKind.BLOCK_STRING, start, position + 3, line, col, prev, dedentBlockStringValue(rawValue));
35253
35287
  } // SourceCharacter
35254
35288
 
35255
35289
 
@@ -35336,7 +35370,7 @@ function readName(source, start, line, col, prev) {
35336
35370
  ++position;
35337
35371
  }
35338
35372
 
35339
- return new Token(TokenKind.NAME, start, position, line, col, prev, body.slice(start, position));
35373
+ return new Token$1(TokenKind.NAME, start, position, line, col, prev, body.slice(start, position));
35340
35374
  } // _ A-Z a-z
35341
35375
 
35342
35376
 
@@ -36671,7 +36705,7 @@ var Parser = /*#__PURE__*/function () {
36671
36705
  var _this$_options4;
36672
36706
 
36673
36707
  if (((_this$_options4 = this._options) === null || _this$_options4 === void 0 ? void 0 : _this$_options4.noLocation) !== true) {
36674
- return new Location(startToken, this._lexer.lastToken, this._lexer.source);
36708
+ return new Location$1(startToken, this._lexer.lastToken, this._lexer.source);
36675
36709
  }
36676
36710
  }
36677
36711
  /**
@@ -36854,7 +36888,7 @@ function getTokenKindDesc(kind) {
36854
36888
  * relevant functions to be called during the visitor's traversal.
36855
36889
  */
36856
36890
 
36857
- var QueryDocumentKeys = {
36891
+ var QueryDocumentKeys$1 = {
36858
36892
  Name: [],
36859
36893
  Document: ['definitions'],
36860
36894
  OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'],
@@ -36901,7 +36935,7 @@ var QueryDocumentKeys = {
36901
36935
  EnumTypeExtension: ['name', 'directives', 'values'],
36902
36936
  InputObjectTypeExtension: ['name', 'directives', 'fields']
36903
36937
  };
36904
- var BREAK = Object.freeze({});
36938
+ var BREAK$1 = Object.freeze({});
36905
36939
  /**
36906
36940
  * visit() will walk through an AST using a depth-first traversal, calling
36907
36941
  * the visitor's enter function at each node in the traversal, and calling the
@@ -36989,8 +37023,8 @@ var BREAK = Object.freeze({});
36989
37023
  * })
36990
37024
  */
36991
37025
 
36992
- function visit(root, visitor) {
36993
- var visitorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : QueryDocumentKeys;
37026
+ function visit$1(root, visitor) {
37027
+ var visitorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : QueryDocumentKeys$1;
36994
37028
 
36995
37029
  /* eslint-disable no-undef-init */
36996
37030
  var stack = undefined;
@@ -37070,16 +37104,16 @@ function visit(root, visitor) {
37070
37104
  var result = void 0;
37071
37105
 
37072
37106
  if (!Array.isArray(node)) {
37073
- if (!isNode(node)) {
37074
- throw new Error("Invalid AST Node: ".concat(inspect(node), "."));
37107
+ if (!isNode$1(node)) {
37108
+ throw new Error("Invalid AST Node: ".concat(inspect$1(node), "."));
37075
37109
  }
37076
37110
 
37077
- var visitFn = getVisitFn(visitor, node.kind, isLeaving);
37111
+ var visitFn = getVisitFn$1(visitor, node.kind, isLeaving);
37078
37112
 
37079
37113
  if (visitFn) {
37080
37114
  result = visitFn.call(visitor, node, key, parent, path, ancestors);
37081
37115
 
37082
- if (result === BREAK) {
37116
+ if (result === BREAK$1) {
37083
37117
  break;
37084
37118
  }
37085
37119
 
@@ -37092,7 +37126,7 @@ function visit(root, visitor) {
37092
37126
  edits.push([key, result]);
37093
37127
 
37094
37128
  if (!isLeaving) {
37095
- if (isNode(result)) {
37129
+ if (isNode$1(result)) {
37096
37130
  node = result;
37097
37131
  } else {
37098
37132
  path.pop();
@@ -37151,7 +37185,7 @@ function visitInParallel(visitors) {
37151
37185
  enter: function enter(node) {
37152
37186
  for (var i = 0; i < visitors.length; i++) {
37153
37187
  if (skipping[i] == null) {
37154
- var fn = getVisitFn(visitors[i], node.kind,
37188
+ var fn = getVisitFn$1(visitors[i], node.kind,
37155
37189
  /* isLeaving */
37156
37190
  false);
37157
37191
 
@@ -37160,8 +37194,8 @@ function visitInParallel(visitors) {
37160
37194
 
37161
37195
  if (result === false) {
37162
37196
  skipping[i] = node;
37163
- } else if (result === BREAK) {
37164
- skipping[i] = BREAK;
37197
+ } else if (result === BREAK$1) {
37198
+ skipping[i] = BREAK$1;
37165
37199
  } else if (result !== undefined) {
37166
37200
  return result;
37167
37201
  }
@@ -37172,15 +37206,15 @@ function visitInParallel(visitors) {
37172
37206
  leave: function leave(node) {
37173
37207
  for (var i = 0; i < visitors.length; i++) {
37174
37208
  if (skipping[i] == null) {
37175
- var fn = getVisitFn(visitors[i], node.kind,
37209
+ var fn = getVisitFn$1(visitors[i], node.kind,
37176
37210
  /* isLeaving */
37177
37211
  true);
37178
37212
 
37179
37213
  if (fn) {
37180
37214
  var result = fn.apply(visitors[i], arguments);
37181
37215
 
37182
- if (result === BREAK) {
37183
- skipping[i] = BREAK;
37216
+ if (result === BREAK$1) {
37217
+ skipping[i] = BREAK$1;
37184
37218
  } else if (result !== undefined && result !== false) {
37185
37219
  return result;
37186
37220
  }
@@ -37197,7 +37231,7 @@ function visitInParallel(visitors) {
37197
37231
  * the function the visitor runtime should call.
37198
37232
  */
37199
37233
 
37200
- function getVisitFn(visitor, kind, isLeaving) {
37234
+ function getVisitFn$1(visitor, kind, isLeaving) {
37201
37235
  var kindVisitor = visitor[kind];
37202
37236
 
37203
37237
  if (kindVisitor) {
@@ -37266,7 +37300,7 @@ function locatedError(rawOriginalError, nodes, path) {
37266
37300
  var _nodes;
37267
37301
 
37268
37302
  // Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface.
37269
- var originalError = rawOriginalError instanceof Error ? rawOriginalError : new Error('Unexpected error value: ' + inspect(rawOriginalError)); // Note: this uses a brand-check to support GraphQL errors originating from other contexts.
37303
+ var originalError = rawOriginalError instanceof Error ? rawOriginalError : new Error('Unexpected error value: ' + inspect$1(rawOriginalError)); // Note: this uses a brand-check to support GraphQL errors originating from other contexts.
37270
37304
 
37271
37305
  if (Array.isArray(originalError.path)) {
37272
37306
  return originalError;
@@ -37634,7 +37668,7 @@ function stringToArray(str) {
37634
37668
  */
37635
37669
 
37636
37670
  function print(ast) {
37637
- return visit(ast, {
37671
+ return visit$1(ast, {
37638
37672
  leave: printDocASTReducer
37639
37673
  });
37640
37674
  }
@@ -37989,7 +38023,7 @@ function valueFromASTUntyped(valueNode, variables) {
37989
38023
  } // istanbul ignore next (Not reachable. All possible value nodes have been considered)
37990
38024
 
37991
38025
 
37992
- invariant(0, 'Unexpected value node: ' + inspect(valueNode));
38026
+ invariant$1(0, 'Unexpected value node: ' + inspect$1(valueNode));
37993
38027
  }
37994
38028
 
37995
38029
  function _defineProperties$2(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -38000,7 +38034,7 @@ function isType(type) {
38000
38034
  }
38001
38035
  function assertType(type) {
38002
38036
  if (!isType(type)) {
38003
- throw new Error("Expected ".concat(inspect(type), " to be a GraphQL type."));
38037
+ throw new Error("Expected ".concat(inspect$1(type), " to be a GraphQL type."));
38004
38038
  }
38005
38039
 
38006
38040
  return type;
@@ -38121,7 +38155,7 @@ Object.defineProperty(GraphQLList.prototype, SYMBOL_TO_STRING_TAG, {
38121
38155
  }
38122
38156
  }); // Print a simplified form when appearing in `inspect` and `util.inspect`.
38123
38157
 
38124
- defineInspect(GraphQLList);
38158
+ defineInspect$1(GraphQLList);
38125
38159
  /**
38126
38160
  * Non-Null Type Wrapper
38127
38161
  *
@@ -38176,7 +38210,7 @@ Object.defineProperty(GraphQLNonNull.prototype, SYMBOL_TO_STRING_TAG, {
38176
38210
  }
38177
38211
  }); // Print a simplified form when appearing in `inspect` and `util.inspect`.
38178
38212
 
38179
- defineInspect(GraphQLNonNull);
38213
+ defineInspect$1(GraphQLNonNull);
38180
38214
  /**
38181
38215
  * These types wrap and modify other types
38182
38216
  */
@@ -38193,7 +38227,7 @@ function isNullableType(type) {
38193
38227
  }
38194
38228
  function assertNullableType(type) {
38195
38229
  if (!isNullableType(type)) {
38196
- throw new Error("Expected ".concat(inspect(type), " to be a GraphQL nullable type."));
38230
+ throw new Error("Expected ".concat(inspect$1(type), " to be a GraphQL nullable type."));
38197
38231
  }
38198
38232
 
38199
38233
  return type;
@@ -38275,7 +38309,7 @@ var GraphQLScalarType = /*#__PURE__*/function () {
38275
38309
  this.astNode = config.astNode;
38276
38310
  this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);
38277
38311
  typeof config.name === 'string' || devAssert(0, 'Must provide name.');
38278
- config.specifiedByUrl == null || typeof config.specifiedByUrl === 'string' || devAssert(0, "".concat(this.name, " must provide \"specifiedByUrl\" as a string, ") + "but got: ".concat(inspect(config.specifiedByUrl), "."));
38312
+ config.specifiedByUrl == null || typeof config.specifiedByUrl === 'string' || devAssert(0, "".concat(this.name, " must provide \"specifiedByUrl\" as a string, ") + "but got: ".concat(inspect$1(config.specifiedByUrl), "."));
38279
38313
  config.serialize == null || typeof config.serialize === 'function' || devAssert(0, "".concat(this.name, " must provide \"serialize\" function. If this custom Scalar is also used as an input type, ensure \"parseValue\" and \"parseLiteral\" functions are also provided."));
38280
38314
 
38281
38315
  if (config.parseLiteral) {
@@ -38320,7 +38354,7 @@ var GraphQLScalarType = /*#__PURE__*/function () {
38320
38354
  return GraphQLScalarType;
38321
38355
  }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
38322
38356
 
38323
- defineInspect(GraphQLScalarType);
38357
+ defineInspect$1(GraphQLScalarType);
38324
38358
 
38325
38359
  /**
38326
38360
  * Object Type Definition
@@ -38370,7 +38404,7 @@ var GraphQLObjectType = /*#__PURE__*/function () {
38370
38404
  this._fields = defineFieldMap.bind(undefined, config);
38371
38405
  this._interfaces = defineInterfaces.bind(undefined, config);
38372
38406
  typeof config.name === 'string' || devAssert(0, 'Must provide name.');
38373
- config.isTypeOf == null || typeof config.isTypeOf === 'function' || devAssert(0, "".concat(this.name, " must provide \"isTypeOf\" as a function, ") + "but got: ".concat(inspect(config.isTypeOf), "."));
38407
+ config.isTypeOf == null || typeof config.isTypeOf === 'function' || devAssert(0, "".concat(this.name, " must provide \"isTypeOf\" as a function, ") + "but got: ".concat(inspect$1(config.isTypeOf), "."));
38374
38408
  }
38375
38409
 
38376
38410
  var _proto2 = GraphQLObjectType.prototype;
@@ -38423,7 +38457,7 @@ var GraphQLObjectType = /*#__PURE__*/function () {
38423
38457
  return GraphQLObjectType;
38424
38458
  }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
38425
38459
 
38426
- defineInspect(GraphQLObjectType);
38460
+ defineInspect$1(GraphQLObjectType);
38427
38461
 
38428
38462
  function defineInterfaces(config) {
38429
38463
  var _resolveThunk;
@@ -38441,7 +38475,7 @@ function defineFieldMap(config) {
38441
38475
 
38442
38476
  isPlainObj(fieldConfig) || devAssert(0, "".concat(config.name, ".").concat(fieldName, " field config must be an object."));
38443
38477
  !('isDeprecated' in fieldConfig) || devAssert(0, "".concat(config.name, ".").concat(fieldName, " should provide \"deprecationReason\" instead of \"isDeprecated\"."));
38444
- fieldConfig.resolve == null || typeof fieldConfig.resolve === 'function' || devAssert(0, "".concat(config.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat(inspect(fieldConfig.resolve), "."));
38478
+ fieldConfig.resolve == null || typeof fieldConfig.resolve === 'function' || devAssert(0, "".concat(config.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat(inspect$1(fieldConfig.resolve), "."));
38445
38479
  var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
38446
38480
  isPlainObj(argsConfig) || devAssert(0, "".concat(config.name, ".").concat(fieldName, " args must be an object with argument names as keys."));
38447
38481
  var args = objectEntries$1(argsConfig).map(function (_ref) {
@@ -38542,7 +38576,7 @@ var GraphQLInterfaceType = /*#__PURE__*/function () {
38542
38576
  this._fields = defineFieldMap.bind(undefined, config);
38543
38577
  this._interfaces = defineInterfaces.bind(undefined, config);
38544
38578
  typeof config.name === 'string' || devAssert(0, 'Must provide name.');
38545
- config.resolveType == null || typeof config.resolveType === 'function' || devAssert(0, "".concat(this.name, " must provide \"resolveType\" as a function, ") + "but got: ".concat(inspect(config.resolveType), "."));
38579
+ config.resolveType == null || typeof config.resolveType === 'function' || devAssert(0, "".concat(this.name, " must provide \"resolveType\" as a function, ") + "but got: ".concat(inspect$1(config.resolveType), "."));
38546
38580
  }
38547
38581
 
38548
38582
  var _proto3 = GraphQLInterfaceType.prototype;
@@ -38597,7 +38631,7 @@ var GraphQLInterfaceType = /*#__PURE__*/function () {
38597
38631
  return GraphQLInterfaceType;
38598
38632
  }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
38599
38633
 
38600
- defineInspect(GraphQLInterfaceType);
38634
+ defineInspect$1(GraphQLInterfaceType);
38601
38635
 
38602
38636
  /**
38603
38637
  * Union Type Definition
@@ -38632,7 +38666,7 @@ var GraphQLUnionType = /*#__PURE__*/function () {
38632
38666
  this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);
38633
38667
  this._types = defineTypes.bind(undefined, config);
38634
38668
  typeof config.name === 'string' || devAssert(0, 'Must provide name.');
38635
- config.resolveType == null || typeof config.resolveType === 'function' || devAssert(0, "".concat(this.name, " must provide \"resolveType\" as a function, ") + "but got: ".concat(inspect(config.resolveType), "."));
38669
+ config.resolveType == null || typeof config.resolveType === 'function' || devAssert(0, "".concat(this.name, " must provide \"resolveType\" as a function, ") + "but got: ".concat(inspect$1(config.resolveType), "."));
38636
38670
  }
38637
38671
 
38638
38672
  var _proto4 = GraphQLUnionType.prototype;
@@ -38678,7 +38712,7 @@ var GraphQLUnionType = /*#__PURE__*/function () {
38678
38712
  return GraphQLUnionType;
38679
38713
  }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
38680
38714
 
38681
- defineInspect(GraphQLUnionType);
38715
+ defineInspect$1(GraphQLUnionType);
38682
38716
 
38683
38717
  function defineTypes(config) {
38684
38718
  var types = resolveThunk(config.types);
@@ -38740,7 +38774,7 @@ var GraphQLEnumType
38740
38774
  var enumValue = this._valueLookup.get(outputValue);
38741
38775
 
38742
38776
  if (enumValue === undefined) {
38743
- throw new GraphQLError("Enum \"".concat(this.name, "\" cannot represent value: ").concat(inspect(outputValue)));
38777
+ throw new GraphQLError("Enum \"".concat(this.name, "\" cannot represent value: ").concat(inspect$1(outputValue)));
38744
38778
  }
38745
38779
 
38746
38780
  return enumValue.name;
@@ -38750,7 +38784,7 @@ var GraphQLEnumType
38750
38784
  /* T */
38751
38785
  {
38752
38786
  if (typeof inputValue !== 'string') {
38753
- var valueStr = inspect(inputValue);
38787
+ var valueStr = inspect$1(inputValue);
38754
38788
  throw new GraphQLError("Enum \"".concat(this.name, "\" cannot represent non-string value: ").concat(valueStr, ".") + didYouMeanEnumValue(this, valueStr));
38755
38789
  }
38756
38790
 
@@ -38826,7 +38860,7 @@ var GraphQLEnumType
38826
38860
  return GraphQLEnumType;
38827
38861
  }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
38828
38862
 
38829
- defineInspect(GraphQLEnumType);
38863
+ defineInspect$1(GraphQLEnumType);
38830
38864
 
38831
38865
  function didYouMeanEnumValue(enumType, unknownValueStr) {
38832
38866
  var allNames = enumType.getValues().map(function (value) {
@@ -38841,7 +38875,7 @@ function defineEnumValues(typeName, valueMap) {
38841
38875
  return objectEntries$1(valueMap).map(function (_ref2) {
38842
38876
  var valueName = _ref2[0],
38843
38877
  valueConfig = _ref2[1];
38844
- isPlainObj(valueConfig) || devAssert(0, "".concat(typeName, ".").concat(valueName, " must refer to an object with a \"value\" key ") + "representing an internal value but got: ".concat(inspect(valueConfig), "."));
38878
+ isPlainObj(valueConfig) || devAssert(0, "".concat(typeName, ".").concat(valueName, " must refer to an object with a \"value\" key ") + "representing an internal value but got: ".concat(inspect$1(valueConfig), "."));
38845
38879
  !('isDeprecated' in valueConfig) || devAssert(0, "".concat(typeName, ".").concat(valueName, " should provide \"deprecationReason\" instead of \"isDeprecated\"."));
38846
38880
  return {
38847
38881
  name: valueName,
@@ -38938,7 +38972,7 @@ var GraphQLInputObjectType = /*#__PURE__*/function () {
38938
38972
  return GraphQLInputObjectType;
38939
38973
  }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
38940
38974
 
38941
- defineInspect(GraphQLInputObjectType);
38975
+ defineInspect$1(GraphQLInputObjectType);
38942
38976
 
38943
38977
  function defineInputFieldMap(config) {
38944
38978
  var fieldMap = resolveThunk(config.fields);
@@ -39084,7 +39118,7 @@ var isFinitePolyfill = Number.isFinite || function (value) {
39084
39118
 
39085
39119
  var isFinite$1 = isFinitePolyfill;
39086
39120
 
39087
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
39121
+ function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
39088
39122
  /**
39089
39123
  * Safer version of `Array.from` that return `null` if value isn't convertible to array.
39090
39124
  * Also protects against Array-like objects without items.
@@ -39105,7 +39139,7 @@ function safeArrayFrom(collection) {
39105
39139
  return item;
39106
39140
  };
39107
39141
 
39108
- if (collection == null || _typeof(collection) !== 'object') {
39142
+ if (collection == null || _typeof$1(collection) !== 'object') {
39109
39143
  return null;
39110
39144
  }
39111
39145
 
@@ -39179,11 +39213,11 @@ function serializeInt(outputValue) {
39179
39213
  }
39180
39214
 
39181
39215
  if (!isInteger$1(num)) {
39182
- throw new GraphQLError("Int cannot represent non-integer value: ".concat(inspect(coercedValue)));
39216
+ throw new GraphQLError("Int cannot represent non-integer value: ".concat(inspect$1(coercedValue)));
39183
39217
  }
39184
39218
 
39185
39219
  if (num > MAX_INT || num < MIN_INT) {
39186
- throw new GraphQLError('Int cannot represent non 32-bit signed integer value: ' + inspect(coercedValue));
39220
+ throw new GraphQLError('Int cannot represent non 32-bit signed integer value: ' + inspect$1(coercedValue));
39187
39221
  }
39188
39222
 
39189
39223
  return num;
@@ -39191,7 +39225,7 @@ function serializeInt(outputValue) {
39191
39225
 
39192
39226
  function coerceInt(inputValue) {
39193
39227
  if (!isInteger$1(inputValue)) {
39194
- throw new GraphQLError("Int cannot represent non-integer value: ".concat(inspect(inputValue)));
39228
+ throw new GraphQLError("Int cannot represent non-integer value: ".concat(inspect$1(inputValue)));
39195
39229
  }
39196
39230
 
39197
39231
  if (inputValue > MAX_INT || inputValue < MIN_INT) {
@@ -39235,7 +39269,7 @@ function serializeFloat(outputValue) {
39235
39269
  }
39236
39270
 
39237
39271
  if (!isFinite$1(num)) {
39238
- throw new GraphQLError("Float cannot represent non numeric value: ".concat(inspect(coercedValue)));
39272
+ throw new GraphQLError("Float cannot represent non numeric value: ".concat(inspect$1(coercedValue)));
39239
39273
  }
39240
39274
 
39241
39275
  return num;
@@ -39243,7 +39277,7 @@ function serializeFloat(outputValue) {
39243
39277
 
39244
39278
  function coerceFloat(inputValue) {
39245
39279
  if (!isFinite$1(inputValue)) {
39246
- throw new GraphQLError("Float cannot represent non numeric value: ".concat(inspect(inputValue)));
39280
+ throw new GraphQLError("Float cannot represent non numeric value: ".concat(inspect$1(inputValue)));
39247
39281
  }
39248
39282
 
39249
39283
  return inputValue;
@@ -39300,12 +39334,12 @@ function serializeString(outputValue) {
39300
39334
  return coercedValue.toString();
39301
39335
  }
39302
39336
 
39303
- throw new GraphQLError("String cannot represent value: ".concat(inspect(outputValue)));
39337
+ throw new GraphQLError("String cannot represent value: ".concat(inspect$1(outputValue)));
39304
39338
  }
39305
39339
 
39306
39340
  function coerceString(inputValue) {
39307
39341
  if (typeof inputValue !== 'string') {
39308
- throw new GraphQLError("String cannot represent a non string value: ".concat(inspect(inputValue)));
39342
+ throw new GraphQLError("String cannot represent a non string value: ".concat(inspect$1(inputValue)));
39309
39343
  }
39310
39344
 
39311
39345
  return inputValue;
@@ -39336,12 +39370,12 @@ function serializeBoolean(outputValue) {
39336
39370
  return coercedValue !== 0;
39337
39371
  }
39338
39372
 
39339
- throw new GraphQLError("Boolean cannot represent a non boolean value: ".concat(inspect(coercedValue)));
39373
+ throw new GraphQLError("Boolean cannot represent a non boolean value: ".concat(inspect$1(coercedValue)));
39340
39374
  }
39341
39375
 
39342
39376
  function coerceBoolean(inputValue) {
39343
39377
  if (typeof inputValue !== 'boolean') {
39344
- throw new GraphQLError("Boolean cannot represent a non boolean value: ".concat(inspect(inputValue)));
39378
+ throw new GraphQLError("Boolean cannot represent a non boolean value: ".concat(inspect$1(inputValue)));
39345
39379
  }
39346
39380
 
39347
39381
  return inputValue;
@@ -39372,7 +39406,7 @@ function serializeID(outputValue) {
39372
39406
  return String(coercedValue);
39373
39407
  }
39374
39408
 
39375
- throw new GraphQLError("ID cannot represent value: ".concat(inspect(outputValue)));
39409
+ throw new GraphQLError("ID cannot represent value: ".concat(inspect$1(outputValue)));
39376
39410
  }
39377
39411
 
39378
39412
  function coerceID(inputValue) {
@@ -39384,7 +39418,7 @@ function coerceID(inputValue) {
39384
39418
  return inputValue.toString();
39385
39419
  }
39386
39420
 
39387
- throw new GraphQLError("ID cannot represent value: ".concat(inspect(inputValue)));
39421
+ throw new GraphQLError("ID cannot represent value: ".concat(inspect$1(inputValue)));
39388
39422
  }
39389
39423
 
39390
39424
  var GraphQLID = new GraphQLScalarType({
@@ -39564,11 +39598,11 @@ function astFromValue(value, type) {
39564
39598
  };
39565
39599
  }
39566
39600
 
39567
- throw new TypeError("Cannot convert value to AST: ".concat(inspect(serialized), "."));
39601
+ throw new TypeError("Cannot convert value to AST: ".concat(inspect$1(serialized), "."));
39568
39602
  } // istanbul ignore next (Not reachable. All possible input types have been considered)
39569
39603
 
39570
39604
 
39571
- invariant(0, 'Unexpected input type: ' + inspect(type));
39605
+ invariant$1(0, 'Unexpected input type: ' + inspect$1(type));
39572
39606
  }
39573
39607
  /**
39574
39608
  * IntValue:
@@ -39798,7 +39832,7 @@ var __Type = new GraphQLObjectType({
39798
39832
  } // istanbul ignore next (Not reachable. All possible types have been considered)
39799
39833
 
39800
39834
 
39801
- invariant(0, "Unexpected type: \"".concat(inspect(type), "\"."));
39835
+ invariant$1(0, "Unexpected type: \"".concat(inspect$1(type), "\"."));
39802
39836
  }
39803
39837
  },
39804
39838
  name: {
@@ -40226,7 +40260,7 @@ var GraphQLDirective = /*#__PURE__*/function () {
40226
40260
  return GraphQLDirective;
40227
40261
  }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
40228
40262
 
40229
- defineInspect(GraphQLDirective);
40263
+ defineInspect$1(GraphQLDirective);
40230
40264
 
40231
40265
  /**
40232
40266
  * Used to conditionally include fields or fragments.
@@ -40312,7 +40346,7 @@ function isSchema(schema) {
40312
40346
  }
40313
40347
  function assertSchema(schema) {
40314
40348
  if (!isSchema(schema)) {
40315
- throw new Error("Expected ".concat(inspect(schema), " to be a GraphQL schema."));
40349
+ throw new Error("Expected ".concat(inspect$1(schema), " to be a GraphQL schema."));
40316
40350
  }
40317
40351
 
40318
40352
  return schema;
@@ -40391,8 +40425,8 @@ var GraphQLSchema = /*#__PURE__*/function () {
40391
40425
  this.__validationErrors = config.assumeValid === true ? [] : undefined; // Check for common mistakes during construction to produce early errors.
40392
40426
 
40393
40427
  isObjectLike(config) || devAssert(0, 'Must provide configuration object.');
40394
- !config.types || Array.isArray(config.types) || devAssert(0, "\"types\" must be Array if provided but got: ".concat(inspect(config.types), "."));
40395
- !config.directives || Array.isArray(config.directives) || devAssert(0, '"directives" must be Array if provided but got: ' + "".concat(inspect(config.directives), "."));
40428
+ !config.types || Array.isArray(config.types) || devAssert(0, "\"types\" must be Array if provided but got: ".concat(inspect$1(config.types), "."));
40429
+ !config.directives || Array.isArray(config.directives) || devAssert(0, '"directives" must be Array if provided but got: ' + "".concat(inspect$1(config.directives), "."));
40396
40430
  this.description = config.description;
40397
40431
  this.extensions = config.extensions && toObjMap(config.extensions);
40398
40432
  this.astNode = config.astNode;
@@ -40724,7 +40758,7 @@ function validateRootTypes(context) {
40724
40758
  } else if (!isObjectType(queryType)) {
40725
40759
  var _getOperationTypeNode;
40726
40760
 
40727
- context.reportError("Query root type must be Object type, it cannot be ".concat(inspect(queryType), "."), (_getOperationTypeNode = getOperationTypeNode(schema, 'query')) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode);
40761
+ context.reportError("Query root type must be Object type, it cannot be ".concat(inspect$1(queryType), "."), (_getOperationTypeNode = getOperationTypeNode(schema, 'query')) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode);
40728
40762
  }
40729
40763
 
40730
40764
  var mutationType = schema.getMutationType();
@@ -40732,7 +40766,7 @@ function validateRootTypes(context) {
40732
40766
  if (mutationType && !isObjectType(mutationType)) {
40733
40767
  var _getOperationTypeNode2;
40734
40768
 
40735
- context.reportError('Mutation root type must be Object type if provided, it cannot be ' + "".concat(inspect(mutationType), "."), (_getOperationTypeNode2 = getOperationTypeNode(schema, 'mutation')) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode);
40769
+ context.reportError('Mutation root type must be Object type if provided, it cannot be ' + "".concat(inspect$1(mutationType), "."), (_getOperationTypeNode2 = getOperationTypeNode(schema, 'mutation')) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode);
40736
40770
  }
40737
40771
 
40738
40772
  var subscriptionType = schema.getSubscriptionType();
@@ -40740,7 +40774,7 @@ function validateRootTypes(context) {
40740
40774
  if (subscriptionType && !isObjectType(subscriptionType)) {
40741
40775
  var _getOperationTypeNode3;
40742
40776
 
40743
- context.reportError('Subscription root type must be Object type if provided, it cannot be ' + "".concat(inspect(subscriptionType), "."), (_getOperationTypeNode3 = getOperationTypeNode(schema, 'subscription')) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode);
40777
+ context.reportError('Subscription root type must be Object type if provided, it cannot be ' + "".concat(inspect$1(subscriptionType), "."), (_getOperationTypeNode3 = getOperationTypeNode(schema, 'subscription')) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode);
40744
40778
  }
40745
40779
  }
40746
40780
 
@@ -40766,7 +40800,7 @@ function validateDirectives(context) {
40766
40800
 
40767
40801
  // Ensure all directives are in fact GraphQL directives.
40768
40802
  if (!isDirective(directive)) {
40769
- context.reportError("Expected directive but got: ".concat(inspect(directive), "."), directive === null || directive === void 0 ? void 0 : directive.astNode);
40803
+ context.reportError("Expected directive but got: ".concat(inspect$1(directive), "."), directive === null || directive === void 0 ? void 0 : directive.astNode);
40770
40804
  continue;
40771
40805
  } // Ensure they are named correctly.
40772
40806
 
@@ -40780,7 +40814,7 @@ function validateDirectives(context) {
40780
40814
  validateName(context, arg); // Ensure the type is an input type.
40781
40815
 
40782
40816
  if (!isInputType(arg.type)) {
40783
- context.reportError("The type of @".concat(directive.name, "(").concat(arg.name, ":) must be Input Type ") + "but got: ".concat(inspect(arg.type), "."), arg.astNode);
40817
+ context.reportError("The type of @".concat(directive.name, "(").concat(arg.name, ":) must be Input Type ") + "but got: ".concat(inspect$1(arg.type), "."), arg.astNode);
40784
40818
  }
40785
40819
 
40786
40820
  if (isRequiredArgument(arg) && arg.deprecationReason != null) {
@@ -40811,7 +40845,7 @@ function validateTypes(context) {
40811
40845
 
40812
40846
  // Ensure all provided types are in fact GraphQL type.
40813
40847
  if (!isNamedType(type)) {
40814
- context.reportError("Expected GraphQL named type but got: ".concat(inspect(type), "."), type.astNode);
40848
+ context.reportError("Expected GraphQL named type but got: ".concat(inspect$1(type), "."), type.astNode);
40815
40849
  continue;
40816
40850
  } // Ensure it is named correctly (excluding introspection types).
40817
40851
 
@@ -40860,7 +40894,7 @@ function validateFields(context, type) {
40860
40894
  if (!isOutputType(field.type)) {
40861
40895
  var _field$astNode;
40862
40896
 
40863
- context.reportError("The type of ".concat(type.name, ".").concat(field.name, " must be Output Type ") + "but got: ".concat(inspect(field.type), "."), (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type);
40897
+ context.reportError("The type of ".concat(type.name, ".").concat(field.name, " must be Output Type ") + "but got: ".concat(inspect$1(field.type), "."), (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type);
40864
40898
  } // Ensure the arguments are valid
40865
40899
 
40866
40900
 
@@ -40873,7 +40907,7 @@ function validateFields(context, type) {
40873
40907
  if (!isInputType(arg.type)) {
40874
40908
  var _arg$astNode2;
40875
40909
 
40876
- context.reportError("The type of ".concat(type.name, ".").concat(field.name, "(").concat(argName, ":) must be Input ") + "Type but got: ".concat(inspect(arg.type), "."), (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type);
40910
+ context.reportError("The type of ".concat(type.name, ".").concat(field.name, "(").concat(argName, ":) must be Input ") + "Type but got: ".concat(inspect$1(arg.type), "."), (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type);
40877
40911
  }
40878
40912
 
40879
40913
  if (isRequiredArgument(arg) && arg.deprecationReason != null) {
@@ -40893,7 +40927,7 @@ function validateInterfaces(context, type) {
40893
40927
  var iface = _type$getInterfaces2[_i14];
40894
40928
 
40895
40929
  if (!isInterfaceType(iface)) {
40896
- context.reportError("Type ".concat(inspect(type), " must only implement Interface types, ") + "it cannot implement ".concat(inspect(iface), "."), getAllImplementsInterfaceNodes(type, iface));
40930
+ context.reportError("Type ".concat(inspect$1(type), " must only implement Interface types, ") + "it cannot implement ".concat(inspect$1(iface), "."), getAllImplementsInterfaceNodes(type, iface));
40897
40931
  continue;
40898
40932
  }
40899
40933
 
@@ -40931,7 +40965,7 @@ function validateTypeImplementsInterface(context, type, iface) {
40931
40965
  if (!isTypeSubTypeOf(context.schema, typeField.type, ifaceField.type)) {
40932
40966
  var _ifaceField$astNode, _typeField$astNode;
40933
40967
 
40934
- context.reportError("Interface field ".concat(iface.name, ".").concat(fieldName, " expects type ") + "".concat(inspect(ifaceField.type), " but ").concat(type.name, ".").concat(fieldName, " ") + "is type ".concat(inspect(typeField.type), "."), [// istanbul ignore next (TODO need to write coverage tests)
40968
+ context.reportError("Interface field ".concat(iface.name, ".").concat(fieldName, " expects type ") + "".concat(inspect$1(ifaceField.type), " but ").concat(type.name, ".").concat(fieldName, " ") + "is type ".concat(inspect$1(typeField.type), "."), [// istanbul ignore next (TODO need to write coverage tests)
40935
40969
  (_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, // istanbul ignore next (TODO need to write coverage tests)
40936
40970
  (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type]);
40937
40971
  } // Assert each interface field arg is implemented.
@@ -40955,7 +40989,7 @@ function validateTypeImplementsInterface(context, type, iface) {
40955
40989
  if (!isEqualType(ifaceArg.type, typeArg.type)) {
40956
40990
  var _ifaceArg$astNode, _typeArg$astNode;
40957
40991
 
40958
- context.reportError("Interface field argument ".concat(iface.name, ".").concat(fieldName, "(").concat(argName, ":) ") + "expects type ".concat(inspect(ifaceArg.type), " but ") + "".concat(type.name, ".").concat(fieldName, "(").concat(argName, ":) is type ") + "".concat(inspect(typeArg.type), "."), [// istanbul ignore next (TODO need to write coverage tests)
40992
+ context.reportError("Interface field argument ".concat(iface.name, ".").concat(fieldName, "(").concat(argName, ":) ") + "expects type ".concat(inspect$1(ifaceArg.type), " but ") + "".concat(type.name, ".").concat(fieldName, "(").concat(argName, ":) is type ") + "".concat(inspect$1(typeArg.type), "."), [// istanbul ignore next (TODO need to write coverage tests)
40959
40993
  (_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, // istanbul ignore next (TODO need to write coverage tests)
40960
40994
  (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type]);
40961
40995
  } // TODO: validate default values?
@@ -41019,7 +41053,7 @@ function validateUnionMembers(context, union) {
41019
41053
  includedTypeNames[memberType.name] = true;
41020
41054
 
41021
41055
  if (!isObjectType(memberType)) {
41022
- context.reportError("Union type ".concat(union.name, " can only include Object types, ") + "it cannot include ".concat(inspect(memberType), "."), getUnionMemberTypeNodes(union, String(memberType)));
41056
+ context.reportError("Union type ".concat(union.name, " can only include Object types, ") + "it cannot include ".concat(inspect$1(memberType), "."), getUnionMemberTypeNodes(union, String(memberType)));
41023
41057
  }
41024
41058
  }
41025
41059
  }
@@ -41059,7 +41093,7 @@ function validateInputFields(context, inputObj) {
41059
41093
  if (!isInputType(field.type)) {
41060
41094
  var _field$astNode2;
41061
41095
 
41062
- context.reportError("The type of ".concat(inputObj.name, ".").concat(field.name, " must be Input Type ") + "but got: ".concat(inspect(field.type), "."), (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type);
41096
+ context.reportError("The type of ".concat(inputObj.name, ".").concat(field.name, " must be Input Type ") + "but got: ".concat(inspect$1(field.type), "."), (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type);
41063
41097
  }
41064
41098
 
41065
41099
  if (isRequiredInputField(field) && field.deprecationReason != null) {
@@ -41196,7 +41230,7 @@ function typeFromAST(schema, typeNode) {
41196
41230
  } // istanbul ignore next (Not reachable. All possible type nodes have been considered)
41197
41231
 
41198
41232
 
41199
- invariant(0, 'Unexpected type node: ' + inspect(typeNode));
41233
+ invariant$1(0, 'Unexpected type node: ' + inspect$1(typeNode));
41200
41234
  }
41201
41235
 
41202
41236
  function isTypeSystemDefinitionNode(node) {
@@ -41313,7 +41347,7 @@ function KnownDirectivesRule(context) {
41313
41347
 
41314
41348
  function getDirectiveLocationForASTPath(ancestors) {
41315
41349
  var appliedTo = ancestors[ancestors.length - 1];
41316
- !Array.isArray(appliedTo) || invariant(0);
41350
+ !Array.isArray(appliedTo) || invariant$1(0);
41317
41351
 
41318
41352
  switch (appliedTo.kind) {
41319
41353
  case Kind$1.OPERATION_DEFINITION:
@@ -41389,7 +41423,7 @@ function getDirectiveLocationForOperation(operation) {
41389
41423
  } // istanbul ignore next (Not reachable. All possible types have been considered)
41390
41424
 
41391
41425
 
41392
- invariant(0, 'Unexpected operation: ' + inspect(operation));
41426
+ invariant$1(0, 'Unexpected operation: ' + inspect$1(operation));
41393
41427
  }
41394
41428
 
41395
41429
  /**
@@ -41597,7 +41631,7 @@ function ProvidedRequiredArgumentsOnDirectivesRule(context) {
41597
41631
 
41598
41632
  if (!argNodeMap[argName]) {
41599
41633
  var argType = requiredArgs[argName].type;
41600
- var argTypeStr = isType(argType) ? inspect(argType) : print(argType);
41634
+ var argTypeStr = isType(argType) ? inspect$1(argType) : print(argType);
41601
41635
  context.reportError(new GraphQLError("Directive \"@".concat(directiveName, "\" argument \"").concat(argName, "\" of type \"").concat(argTypeStr, "\" is required, but it was not provided."), directiveNode));
41602
41636
  }
41603
41637
  }
@@ -41963,7 +41997,7 @@ function typeToExtKind(type) {
41963
41997
  } // istanbul ignore next (Not reachable. All possible types have been considered)
41964
41998
 
41965
41999
 
41966
- invariant(0, 'Unexpected type: ' + inspect(type));
42000
+ invariant$1(0, 'Unexpected type: ' + inspect$1(type));
41967
42001
  }
41968
42002
 
41969
42003
  function extensionKindToTypeName(kind) {
@@ -41988,7 +42022,7 @@ function extensionKindToTypeName(kind) {
41988
42022
  } // istanbul ignore next (Not reachable. All possible types have been considered)
41989
42023
 
41990
42024
 
41991
- invariant(0, 'Unexpected kind: ' + inspect(kind));
42025
+ invariant$1(0, 'Unexpected kind: ' + inspect$1(kind));
41992
42026
  }
41993
42027
 
41994
42028
  // Spec Section: "Executable Definitions"
@@ -42135,7 +42169,7 @@ function validateSDL(documentAST, schemaToExtend) {
42135
42169
  var visitors = rules.map(function (rule) {
42136
42170
  return rule(context);
42137
42171
  });
42138
- visit(documentAST, visitInParallel(visitors));
42172
+ visit$1(documentAST, visitInParallel(visitors));
42139
42173
  return errors;
42140
42174
  }
42141
42175
  /**
@@ -42476,7 +42510,7 @@ function valueFromAST(valueNode, type, variables) {
42476
42510
  } // istanbul ignore next (Not reachable. All possible input types have been considered)
42477
42511
 
42478
42512
 
42479
- invariant(0, 'Unexpected input type: ' + inspect(type));
42513
+ invariant$1(0, 'Unexpected input type: ' + inspect$1(type));
42480
42514
  } // Returns true if the provided valueNode is a variable which is not defined
42481
42515
  // in the set of variables.
42482
42516
 
@@ -42493,7 +42527,7 @@ function coerceInputValue(inputValue, type) {
42493
42527
  }
42494
42528
 
42495
42529
  function defaultOnError(path, invalidValue, error) {
42496
- var errorPrefix = 'Invalid value ' + inspect(invalidValue);
42530
+ var errorPrefix = 'Invalid value ' + inspect$1(invalidValue);
42497
42531
 
42498
42532
  if (path.length > 0) {
42499
42533
  errorPrefix += " at \"value".concat(printPathArray(path), "\"");
@@ -42509,7 +42543,7 @@ function coerceInputValueImpl(inputValue, type, onError, path) {
42509
42543
  return coerceInputValueImpl(inputValue, type.ofType, onError, path);
42510
42544
  }
42511
42545
 
42512
- onError(pathToArray(path), inputValue, new GraphQLError("Expected non-nullable type \"".concat(inspect(type), "\" not to be null.")));
42546
+ onError(pathToArray(path), inputValue, new GraphQLError("Expected non-nullable type \"".concat(inspect$1(type), "\" not to be null.")));
42513
42547
  return;
42514
42548
  }
42515
42549
 
@@ -42550,7 +42584,7 @@ function coerceInputValueImpl(inputValue, type, onError, path) {
42550
42584
  if (field.defaultValue !== undefined) {
42551
42585
  coercedValue[field.name] = field.defaultValue;
42552
42586
  } else if (isNonNullType(field.type)) {
42553
- var typeStr = inspect(field.type);
42587
+ var typeStr = inspect$1(field.type);
42554
42588
  onError(pathToArray(path), inputValue, new GraphQLError("Field \"".concat(field.name, "\" of required type \"").concat(typeStr, "\" was not provided.")));
42555
42589
  }
42556
42590
 
@@ -42599,7 +42633,7 @@ function coerceInputValueImpl(inputValue, type, onError, path) {
42599
42633
  } // istanbul ignore next (Not reachable. All possible input types have been considered)
42600
42634
 
42601
42635
 
42602
- invariant(0, 'Unexpected input type: ' + inspect(type));
42636
+ invariant$1(0, 'Unexpected input type: ' + inspect$1(type));
42603
42637
  }
42604
42638
 
42605
42639
  /**
@@ -42660,7 +42694,7 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
42660
42694
  if (varDefNode.defaultValue) {
42661
42695
  coercedValues[varName] = valueFromAST(varDefNode.defaultValue, varType);
42662
42696
  } else if (isNonNullType(varType)) {
42663
- var _varTypeStr = inspect(varType);
42697
+ var _varTypeStr = inspect$1(varType);
42664
42698
 
42665
42699
  onError(new GraphQLError("Variable \"$".concat(varName, "\" of required type \"").concat(_varTypeStr, "\" was not provided."), varDefNode));
42666
42700
  }
@@ -42671,14 +42705,14 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
42671
42705
  var value = inputs[varName];
42672
42706
 
42673
42707
  if (value === null && isNonNullType(varType)) {
42674
- var _varTypeStr2 = inspect(varType);
42708
+ var _varTypeStr2 = inspect$1(varType);
42675
42709
 
42676
42710
  onError(new GraphQLError("Variable \"$".concat(varName, "\" of non-null type \"").concat(_varTypeStr2, "\" must not be null."), varDefNode));
42677
42711
  return "continue";
42678
42712
  }
42679
42713
 
42680
42714
  coercedValues[varName] = coerceInputValue(value, varType, function (path, invalidValue, error) {
42681
- var prefix = "Variable \"$".concat(varName, "\" got invalid value ") + inspect(invalidValue);
42715
+ var prefix = "Variable \"$".concat(varName, "\" got invalid value ") + inspect$1(invalidValue);
42682
42716
 
42683
42717
  if (path.length > 0) {
42684
42718
  prefix += " at \"".concat(varName).concat(printPathArray(path), "\"");
@@ -42728,7 +42762,7 @@ function getArgumentValues(def, node, variableValues) {
42728
42762
  if (argDef.defaultValue !== undefined) {
42729
42763
  coercedValues[name] = argDef.defaultValue;
42730
42764
  } else if (isNonNullType(argType)) {
42731
- throw new GraphQLError("Argument \"".concat(name, "\" of required type \"").concat(inspect(argType), "\" ") + 'was not provided.', node);
42765
+ throw new GraphQLError("Argument \"".concat(name, "\" of required type \"").concat(inspect$1(argType), "\" ") + 'was not provided.', node);
42732
42766
  }
42733
42767
 
42734
42768
  continue;
@@ -42744,7 +42778,7 @@ function getArgumentValues(def, node, variableValues) {
42744
42778
  if (argDef.defaultValue !== undefined) {
42745
42779
  coercedValues[name] = argDef.defaultValue;
42746
42780
  } else if (isNonNullType(argType)) {
42747
- throw new GraphQLError("Argument \"".concat(name, "\" of required type \"").concat(inspect(argType), "\" ") + "was provided the variable \"$".concat(variableName, "\" which was not provided a runtime value."), valueNode);
42781
+ throw new GraphQLError("Argument \"".concat(name, "\" of required type \"").concat(inspect$1(argType), "\" ") + "was provided the variable \"$".concat(variableName, "\" which was not provided a runtime value."), valueNode);
42748
42782
  }
42749
42783
 
42750
42784
  continue;
@@ -42754,7 +42788,7 @@ function getArgumentValues(def, node, variableValues) {
42754
42788
  }
42755
42789
 
42756
42790
  if (isNull && isNonNullType(argType)) {
42757
- throw new GraphQLError("Argument \"".concat(name, "\" of non-null type \"").concat(inspect(argType), "\" ") + 'must not be null.', valueNode);
42791
+ throw new GraphQLError("Argument \"".concat(name, "\" of non-null type \"").concat(inspect$1(argType), "\" ") + 'must not be null.', valueNode);
42758
42792
  }
42759
42793
 
42760
42794
  var coercedValue = valueFromAST(valueNode, argType, variableValues);
@@ -43342,7 +43376,7 @@ function completeValue(exeContext, returnType, fieldNodes, info, path, result) {
43342
43376
  } // istanbul ignore next (Not reachable. All possible output types have been considered)
43343
43377
 
43344
43378
 
43345
- invariant(0, 'Cannot complete value of unexpected output type: ' + inspect(returnType));
43379
+ invariant$1(0, 'Cannot complete value of unexpected output type: ' + inspect$1(returnType));
43346
43380
  }
43347
43381
  /**
43348
43382
  * Complete a list value by completing each item in the list with the
@@ -43404,7 +43438,7 @@ function completeLeafValue(returnType, result) {
43404
43438
  var serializedResult = returnType.serialize(result);
43405
43439
 
43406
43440
  if (serializedResult === undefined) {
43407
- throw new Error("Expected a value of type \"".concat(inspect(returnType), "\" but ") + "received: ".concat(inspect(result)));
43441
+ throw new Error("Expected a value of type \"".concat(inspect$1(returnType), "\" but ") + "received: ".concat(inspect$1(result)));
43408
43442
  }
43409
43443
 
43410
43444
  return serializedResult;
@@ -43440,7 +43474,7 @@ function ensureValidRuntimeType(runtimeTypeOrName, exeContext, returnType, field
43440
43474
  var runtimeTypeName = isNamedType(runtimeTypeOrName) ? runtimeTypeOrName.name : runtimeTypeOrName;
43441
43475
 
43442
43476
  if (typeof runtimeTypeName !== 'string') {
43443
- throw new GraphQLError("Abstract type \"".concat(returnType.name, "\" must resolve to an Object type at runtime for field \"").concat(info.parentType.name, ".").concat(info.fieldName, "\" with ") + "value ".concat(inspect(result), ", received \"").concat(inspect(runtimeTypeOrName), "\"."));
43477
+ throw new GraphQLError("Abstract type \"".concat(returnType.name, "\" must resolve to an Object type at runtime for field \"").concat(info.parentType.name, ".").concat(info.fieldName, "\" with ") + "value ".concat(inspect$1(result), ", received \"").concat(inspect$1(runtimeTypeOrName), "\"."));
43444
43478
  }
43445
43479
 
43446
43480
  var runtimeType = exeContext.schema.getType(runtimeTypeName);
@@ -43490,7 +43524,7 @@ function completeObjectValue(exeContext, returnType, fieldNodes, info, path, res
43490
43524
  }
43491
43525
 
43492
43526
  function invalidReturnTypeError(returnType, result, fieldNodes) {
43493
- return new GraphQLError("Expected value of type \"".concat(returnType.name, "\" but got: ").concat(inspect(result), "."), fieldNodes);
43527
+ return new GraphQLError("Expected value of type \"".concat(returnType.name, "\" but got: ").concat(inspect$1(result), "."), fieldNodes);
43494
43528
  }
43495
43529
 
43496
43530
  function collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result) {
@@ -43782,7 +43816,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
43782
43816
  } // istanbul ignore next (Not reachable. All possible types have been considered)
43783
43817
 
43784
43818
 
43785
- invariant(0, 'Unexpected type: ' + inspect(type));
43819
+ invariant$1(0, 'Unexpected type: ' + inspect$1(type));
43786
43820
  }
43787
43821
 
43788
43822
  function extendInputObjectType(type) {
@@ -44212,7 +44246,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
44212
44246
  } // istanbul ignore next (Not reachable. All possible type definition nodes have been considered)
44213
44247
 
44214
44248
 
44215
- invariant(0, 'Unexpected type definition node: ' + inspect(astNode));
44249
+ invariant$1(0, 'Unexpected type definition node: ' + inspect$1(astNode));
44216
44250
  }
44217
44251
  }
44218
44252
  var stdTypeMap = keyMap(specifiedScalarTypes.concat(introspectionTypes), function (type) {
@@ -44734,7 +44768,7 @@ function selectionSetVisitor(ast, luvioSelectionPath, transformState) {
44734
44768
  }
44735
44769
  },
44736
44770
  };
44737
- visit(ast, visitor);
44771
+ visit$1(ast, visitor);
44738
44772
  }
44739
44773
 
44740
44774
  function transform$5(node) {
@@ -45182,6 +45216,15 @@ function parseAndVisit(source) {
45182
45216
 
45183
45217
  var FIRST_DAY_OF_WEEK = 0;
45184
45218
 
45219
+ var graphqQueryFieldLimit = {
45220
+ isOpen: function (e) {
45221
+ return e.fallback;
45222
+ },
45223
+ hasError: function () {
45224
+ return !0;
45225
+ },
45226
+ };
45227
+
45185
45228
  var caseSensitiveUserId = '005B0000000GR4OIAW';
45186
45229
 
45187
45230
  function requestIdleDetectedCallback(_callback) { }
@@ -47402,6 +47445,11 @@ class DurableDraftQueue {
47402
47445
  this.userState = DraftQueueState.Stopped;
47403
47446
  this.uploadingActionId = undefined;
47404
47447
  this.timeoutHandler = undefined;
47448
+ this.logger = typeof __nimbus !== 'undefined' &&
47449
+ __nimbus.plugins !== undefined &&
47450
+ __nimbus.plugins.JSLoggerPlugin !== undefined
47451
+ ? __nimbus.plugins.JSLoggerPlugin
47452
+ : undefined;
47405
47453
  this.handlers = {};
47406
47454
  this.draftStore = draftStore;
47407
47455
  this.workerPool = new AsyncWorkerPool(1);
@@ -47442,12 +47490,13 @@ class DurableDraftQueue {
47442
47490
  await this.notifyChangedListeners({
47443
47491
  type: DraftQueueEventType.QueueStateChanged,
47444
47492
  state: this.state,
47493
+ draftCount: this.draftStore.getCount(),
47445
47494
  });
47446
47495
  const result = await this.processNextAction();
47447
47496
  switch (result) {
47448
47497
  case ProcessActionResult.BLOCKED_ON_ERROR:
47449
47498
  this.state = DraftQueueState.Error;
47450
- return Promise.reject();
47499
+ return Promise.reject('Unable to start queue - first action is in error state');
47451
47500
  default:
47452
47501
  return Promise.resolve();
47453
47502
  }
@@ -47458,16 +47507,22 @@ class DurableDraftQueue {
47458
47507
  // Do nothing if the queue state is already stopped
47459
47508
  return Promise.resolve();
47460
47509
  }
47461
- this.stopQueueManually();
47510
+ this.stopQueueManually(false);
47462
47511
  return this.notifyChangedListeners({
47463
47512
  type: DraftQueueEventType.QueueStateChanged,
47464
47513
  state: DraftQueueState.Stopped,
47514
+ draftCount: this.draftStore.getCount(),
47465
47515
  });
47466
47516
  }
47467
47517
  /**
47468
47518
  * Used to stop the queue within DraftQueue without user interaction
47469
47519
  */
47470
- stopQueueManually() {
47520
+ stopQueueManually(internalReason) {
47521
+ if (this.logger) {
47522
+ this.logger.logInfo(internalReason
47523
+ ? 'Draft queue stopped for internal reason'
47524
+ : 'Draft queue stopped by app');
47525
+ }
47471
47526
  if (this.timeoutHandler) {
47472
47527
  clearTimeout(this.timeoutHandler);
47473
47528
  this.timeoutHandler = undefined;
@@ -47510,6 +47565,7 @@ class DurableDraftQueue {
47510
47565
  await this.notifyChangedListeners({
47511
47566
  type: DraftQueueEventType.ActionAdded,
47512
47567
  action: pendingAction,
47568
+ draftCount: this.draftStore.getCount(),
47513
47569
  });
47514
47570
  await handler.handleActionEnqueued(pendingAction, queue);
47515
47571
  if (this.state === DraftQueueState.Started) {
@@ -47542,6 +47598,7 @@ class DurableDraftQueue {
47542
47598
  await this.notifyChangedListeners({
47543
47599
  type: DraftQueueEventType.ActionCompleted,
47544
47600
  action,
47601
+ draftCount: this.draftStore.getCount(),
47545
47602
  });
47546
47603
  if (this.state === DraftQueueState.Started) {
47547
47604
  this.processNextAction();
@@ -47591,6 +47648,7 @@ class DurableDraftQueue {
47591
47648
  await this.notifyChangedListeners({
47592
47649
  type: DraftQueueEventType.ActionFailed,
47593
47650
  action: action,
47651
+ draftCount: this.draftStore.getCount(),
47594
47652
  });
47595
47653
  return ProcessActionResult.BLOCKED_ON_ERROR;
47596
47654
  }
@@ -47607,6 +47665,7 @@ class DurableDraftQueue {
47607
47665
  await this.notifyChangedListeners({
47608
47666
  type: DraftQueueEventType.ActionUploading,
47609
47667
  action: { ...action, status: DraftActionStatus.Uploading },
47668
+ draftCount: this.draftStore.getCount(),
47610
47669
  });
47611
47670
  return this.handle(action);
47612
47671
  }
@@ -47628,6 +47687,7 @@ class DurableDraftQueue {
47628
47687
  return this.notifyChangedListeners({
47629
47688
  type: DraftQueueEventType.ActionFailed,
47630
47689
  action: errorAction,
47690
+ draftCount: this.draftStore.getCount(),
47631
47691
  });
47632
47692
  }
47633
47693
  async notifyChangedListeners(event) {
@@ -47674,6 +47734,7 @@ class DurableDraftQueue {
47674
47734
  await this.notifyChangedListeners({
47675
47735
  type: DraftQueueEventType.ActionDeleted,
47676
47736
  action,
47737
+ draftCount: this.draftStore.getCount(),
47677
47738
  });
47678
47739
  if (this.userState === DraftQueueState.Started &&
47679
47740
  this.state !== DraftQueueState.Started &&
@@ -47683,7 +47744,7 @@ class DurableDraftQueue {
47683
47744
  }
47684
47745
  async updateDraftAction(action) {
47685
47746
  // stop queue manually
47686
- this.stopQueueManually();
47747
+ this.stopQueueManually(true);
47687
47748
  const actionStatus = await this.statusOfAction(action.id);
47688
47749
  if (actionStatus === DraftActionStatus.Uploading) {
47689
47750
  return Promise.reject('cannot update an uploading action');
@@ -47713,7 +47774,7 @@ class DurableDraftQueue {
47713
47774
  return this.replaceOrMergeActions(targetActionId, sourceActionId, true);
47714
47775
  }
47715
47776
  async retryAction(actionId) {
47716
- this.stopQueueManually();
47777
+ this.stopQueueManually(true);
47717
47778
  const actions = await this.getQueueActions();
47718
47779
  const target = actions[0];
47719
47780
  if (!target || target.id !== actionId) {
@@ -47731,6 +47792,7 @@ class DurableDraftQueue {
47731
47792
  await this.notifyChangedListeners({
47732
47793
  type: DraftQueueEventType.ActionUpdated,
47733
47794
  action: pendingAction,
47795
+ draftCount: this.draftStore.getCount(),
47734
47796
  });
47735
47797
  await this.startQueueSafe();
47736
47798
  return pendingAction;
@@ -47756,6 +47818,7 @@ class DurableDraftQueue {
47756
47818
  await this.notifyChangedListeners({
47757
47819
  type: DraftQueueEventType.ActionUpdated,
47758
47820
  action: action,
47821
+ draftCount: this.draftStore.getCount(),
47759
47822
  });
47760
47823
  return action;
47761
47824
  }
@@ -47763,6 +47826,7 @@ class DurableDraftQueue {
47763
47826
  await this.notifyChangedListeners({
47764
47827
  type: DraftQueueEventType.QueueStateChanged,
47765
47828
  state: DraftQueueState.Waiting,
47829
+ draftCount: this.draftStore.getCount(),
47766
47830
  });
47767
47831
  this.timeoutHandler = setTimeout(() => {
47768
47832
  if (this.state !== DraftQueueState.Stopped) {
@@ -47821,7 +47885,7 @@ class DurableDraftQueue {
47821
47885
  if (this.replacingAction !== undefined) {
47822
47886
  throw Error('Cannot replace/merge actions while a replace/merge action operation is in progress.');
47823
47887
  }
47824
- this.stopQueueManually();
47888
+ this.stopQueueManually(true);
47825
47889
  const promise = this.getActionsForReplaceOrMerge(targetActionId, sourceActionId).then(async ({ target, source }) => {
47826
47890
  // put in a try/finally block so we don't leave this.replacingAction
47827
47891
  // indefinitely set
@@ -47837,6 +47901,7 @@ class DurableDraftQueue {
47837
47901
  await this.notifyChangedListeners({
47838
47902
  type: DraftQueueEventType.ActionUpdated,
47839
47903
  action: updatedTarget,
47904
+ draftCount: this.draftStore.getCount(),
47840
47905
  });
47841
47906
  // remove the source from queue
47842
47907
  await this.removeDraftAction(sourceActionId);
@@ -47975,6 +48040,9 @@ class DurableDraftStore {
47975
48040
  };
47976
48041
  return this.enqueueAction(action);
47977
48042
  }
48043
+ getCount() {
48044
+ return keys$7(this.draftStore).length;
48045
+ }
47978
48046
  /**
47979
48047
  * Runs a write operation against the draft store, if the initial
47980
48048
  * revive is still in progress, the action gets enqueued to run once the
@@ -48764,16 +48832,17 @@ class DraftManager {
48764
48832
  return Promise.reject('cannot edit incompatible action type or uploading actions');
48765
48833
  }
48766
48834
  action.data.body.fields = { ...action.data.body.fields, ...fields };
48835
+ action.status = DraftActionStatus.Pending;
48767
48836
  await this.draftQueue.updateDraftAction(action);
48768
48837
  return this.buildDraftQueueItem(action);
48769
48838
  }
48770
48839
  isValidFieldMap(fields) {
48771
48840
  const keys$1 = keys$7(fields);
48772
- const validTypes = ['string', 'number', 'null', 'boolean'];
48841
+ const validTypes = ['string', 'number', 'boolean'];
48773
48842
  for (let i = 0; i < keys$1.length; i++) {
48774
48843
  const key = keys$1[i];
48775
48844
  const value = fields[key];
48776
- if (!validTypes.includes(typeof value)) {
48845
+ if (!validTypes.includes(typeof value) && value !== null) {
48777
48846
  return false;
48778
48847
  }
48779
48848
  }
@@ -48801,6 +48870,7 @@ class DraftManager {
48801
48870
  }
48802
48871
  const data = action.data;
48803
48872
  data.body.fields = { ...data.body.fields, ...fields };
48873
+ action.status = DraftActionStatus.Pending;
48804
48874
  await this.draftQueue.updateDraftAction(action);
48805
48875
  return this.buildDraftQueueItem(action);
48806
48876
  }
@@ -49044,7 +49114,7 @@ function objectsDeepEqual(lhs, rhs) {
49044
49114
 
49045
49115
  const { keys: keys$6, values: values$3, create: create$6, assign: assign$6, freeze: freeze$2, entries: entries$5 } = Object;
49046
49116
  const { stringify: stringify$5, parse: parse$5 } = JSON;
49047
- const { shift } = Array.prototype;
49117
+ const { shift: shift$1 } = Array.prototype;
49048
49118
  const { isArray: isArray$3$1, from: from$2 } = Array;
49049
49119
 
49050
49120
  /**
@@ -49560,7 +49630,7 @@ function recursivelyApplyDraftsToRecord(record, draftMetadata, recordOperations)
49560
49630
  return record;
49561
49631
  }
49562
49632
  // remove the next item from the front of the queue
49563
- const draftOperation = shift.call(recordOperations);
49633
+ const draftOperation = shift$1.call(recordOperations);
49564
49634
  if (draftOperation === undefined) {
49565
49635
  return record;
49566
49636
  }
@@ -49579,6 +49649,7 @@ function recursivelyApplyDraftsToRecord(record, draftMetadata, recordOperations)
49579
49649
  edited: false,
49580
49650
  deleted: false,
49581
49651
  serverValues: {},
49652
+ serverRootValues: undefined,
49582
49653
  draftActionIds: [draftOperation.draftActionId],
49583
49654
  latestDraftActionId: draftOperation.draftActionId,
49584
49655
  };
@@ -49846,6 +49917,7 @@ function buildSyntheticRecordRepresentation(luvio, createOperation, userId, obje
49846
49917
  edited: false,
49847
49918
  deleted: false,
49848
49919
  serverValues: {},
49920
+ serverRootValues: undefined,
49849
49921
  draftActionIds: [draftActionId],
49850
49922
  latestDraftActionId: draftActionId,
49851
49923
  },
@@ -83046,6 +83118,599 @@ var Kind = Object.freeze({
83046
83118
  * The enum type representing the possible kind values of AST nodes.
83047
83119
  */
83048
83120
 
83121
+ function invariant(condition, message) {
83122
+ var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
83123
+
83124
+ if (!booleanCondition) {
83125
+ throw new Error(message != null ? message : 'Unexpected invariant triggered.');
83126
+ }
83127
+ }
83128
+
83129
+ // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
83130
+ var nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;
83131
+ var nodejsCustomInspectSymbol$1 = nodejsCustomInspectSymbol;
83132
+
83133
+ /**
83134
+ * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON`
83135
+ */
83136
+
83137
+ function defineInspect(classObject) {
83138
+ var fn = classObject.prototype.toJSON;
83139
+ typeof fn === 'function' || invariant(0);
83140
+ classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')
83141
+
83142
+ if (nodejsCustomInspectSymbol$1) {
83143
+ classObject.prototype[nodejsCustomInspectSymbol$1] = fn;
83144
+ }
83145
+ }
83146
+
83147
+ /**
83148
+ * Contains a range of UTF-8 character offsets and token references that
83149
+ * identify the region of the source from which the AST derived.
83150
+ */
83151
+ var Location = /*#__PURE__*/function () {
83152
+ /**
83153
+ * The character offset at which this Node begins.
83154
+ */
83155
+
83156
+ /**
83157
+ * The character offset at which this Node ends.
83158
+ */
83159
+
83160
+ /**
83161
+ * The Token at which this Node begins.
83162
+ */
83163
+
83164
+ /**
83165
+ * The Token at which this Node ends.
83166
+ */
83167
+
83168
+ /**
83169
+ * The Source document the AST represents.
83170
+ */
83171
+ function Location(startToken, endToken, source) {
83172
+ this.start = startToken.start;
83173
+ this.end = endToken.end;
83174
+ this.startToken = startToken;
83175
+ this.endToken = endToken;
83176
+ this.source = source;
83177
+ }
83178
+
83179
+ var _proto = Location.prototype;
83180
+
83181
+ _proto.toJSON = function toJSON() {
83182
+ return {
83183
+ start: this.start,
83184
+ end: this.end
83185
+ };
83186
+ };
83187
+
83188
+ return Location;
83189
+ }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
83190
+
83191
+ defineInspect(Location);
83192
+ /**
83193
+ * Represents a range of characters represented by a lexical token
83194
+ * within a Source.
83195
+ */
83196
+
83197
+ var Token = /*#__PURE__*/function () {
83198
+ /**
83199
+ * The kind of Token.
83200
+ */
83201
+
83202
+ /**
83203
+ * The character offset at which this Node begins.
83204
+ */
83205
+
83206
+ /**
83207
+ * The character offset at which this Node ends.
83208
+ */
83209
+
83210
+ /**
83211
+ * The 1-indexed line number on which this Token appears.
83212
+ */
83213
+
83214
+ /**
83215
+ * The 1-indexed column number at which this Token begins.
83216
+ */
83217
+
83218
+ /**
83219
+ * For non-punctuation tokens, represents the interpreted value of the token.
83220
+ */
83221
+
83222
+ /**
83223
+ * Tokens exist as nodes in a double-linked-list amongst all tokens
83224
+ * including ignored tokens. <SOF> is always the first node and <EOF>
83225
+ * the last.
83226
+ */
83227
+ function Token(kind, start, end, line, column, prev, value) {
83228
+ this.kind = kind;
83229
+ this.start = start;
83230
+ this.end = end;
83231
+ this.line = line;
83232
+ this.column = column;
83233
+ this.value = value;
83234
+ this.prev = prev;
83235
+ this.next = null;
83236
+ }
83237
+
83238
+ var _proto2 = Token.prototype;
83239
+
83240
+ _proto2.toJSON = function toJSON() {
83241
+ return {
83242
+ kind: this.kind,
83243
+ value: this.value,
83244
+ line: this.line,
83245
+ column: this.column
83246
+ };
83247
+ };
83248
+
83249
+ return Token;
83250
+ }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
83251
+
83252
+ defineInspect(Token);
83253
+ /**
83254
+ * @internal
83255
+ */
83256
+
83257
+ function isNode(maybeNode) {
83258
+ return maybeNode != null && typeof maybeNode.kind === 'string';
83259
+ }
83260
+ /**
83261
+ * The list of all possible AST node types.
83262
+ */
83263
+
83264
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
83265
+ var MAX_ARRAY_LENGTH = 10;
83266
+ var MAX_RECURSIVE_DEPTH = 2;
83267
+ /**
83268
+ * Used to print values in error messages.
83269
+ */
83270
+
83271
+ function inspect(value) {
83272
+ return formatValue(value, []);
83273
+ }
83274
+
83275
+ function formatValue(value, seenValues) {
83276
+ switch (_typeof(value)) {
83277
+ case 'string':
83278
+ return JSON.stringify(value);
83279
+
83280
+ case 'function':
83281
+ return value.name ? "[function ".concat(value.name, "]") : '[function]';
83282
+
83283
+ case 'object':
83284
+ if (value === null) {
83285
+ return 'null';
83286
+ }
83287
+
83288
+ return formatObjectValue(value, seenValues);
83289
+
83290
+ default:
83291
+ return String(value);
83292
+ }
83293
+ }
83294
+
83295
+ function formatObjectValue(value, previouslySeenValues) {
83296
+ if (previouslySeenValues.indexOf(value) !== -1) {
83297
+ return '[Circular]';
83298
+ }
83299
+
83300
+ var seenValues = [].concat(previouslySeenValues, [value]);
83301
+ var customInspectFn = getCustomFn(value);
83302
+
83303
+ if (customInspectFn !== undefined) {
83304
+ var customValue = customInspectFn.call(value); // check for infinite recursion
83305
+
83306
+ if (customValue !== value) {
83307
+ return typeof customValue === 'string' ? customValue : formatValue(customValue, seenValues);
83308
+ }
83309
+ } else if (Array.isArray(value)) {
83310
+ return formatArray(value, seenValues);
83311
+ }
83312
+
83313
+ return formatObject(value, seenValues);
83314
+ }
83315
+
83316
+ function formatObject(object, seenValues) {
83317
+ var keys = Object.keys(object);
83318
+
83319
+ if (keys.length === 0) {
83320
+ return '{}';
83321
+ }
83322
+
83323
+ if (seenValues.length > MAX_RECURSIVE_DEPTH) {
83324
+ return '[' + getObjectTag(object) + ']';
83325
+ }
83326
+
83327
+ var properties = keys.map(function (key) {
83328
+ var value = formatValue(object[key], seenValues);
83329
+ return key + ': ' + value;
83330
+ });
83331
+ return '{ ' + properties.join(', ') + ' }';
83332
+ }
83333
+
83334
+ function formatArray(array, seenValues) {
83335
+ if (array.length === 0) {
83336
+ return '[]';
83337
+ }
83338
+
83339
+ if (seenValues.length > MAX_RECURSIVE_DEPTH) {
83340
+ return '[Array]';
83341
+ }
83342
+
83343
+ var len = Math.min(MAX_ARRAY_LENGTH, array.length);
83344
+ var remaining = array.length - len;
83345
+ var items = [];
83346
+
83347
+ for (var i = 0; i < len; ++i) {
83348
+ items.push(formatValue(array[i], seenValues));
83349
+ }
83350
+
83351
+ if (remaining === 1) {
83352
+ items.push('... 1 more item');
83353
+ } else if (remaining > 1) {
83354
+ items.push("... ".concat(remaining, " more items"));
83355
+ }
83356
+
83357
+ return '[' + items.join(', ') + ']';
83358
+ }
83359
+
83360
+ function getCustomFn(object) {
83361
+ var customInspectFn = object[String(nodejsCustomInspectSymbol$1)];
83362
+
83363
+ if (typeof customInspectFn === 'function') {
83364
+ return customInspectFn;
83365
+ }
83366
+
83367
+ if (typeof object.inspect === 'function') {
83368
+ return object.inspect;
83369
+ }
83370
+ }
83371
+
83372
+ function getObjectTag(object) {
83373
+ var tag = Object.prototype.toString.call(object).replace(/^\[object /, '').replace(/]$/, '');
83374
+
83375
+ if (tag === 'Object' && typeof object.constructor === 'function') {
83376
+ var name = object.constructor.name;
83377
+
83378
+ if (typeof name === 'string' && name !== '') {
83379
+ return name;
83380
+ }
83381
+ }
83382
+
83383
+ return tag;
83384
+ }
83385
+
83386
+ /**
83387
+ * A visitor is provided to visit, it contains the collection of
83388
+ * relevant functions to be called during the visitor's traversal.
83389
+ */
83390
+
83391
+ var QueryDocumentKeys = {
83392
+ Name: [],
83393
+ Document: ['definitions'],
83394
+ OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'],
83395
+ VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],
83396
+ Variable: ['name'],
83397
+ SelectionSet: ['selections'],
83398
+ Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],
83399
+ Argument: ['name', 'value'],
83400
+ FragmentSpread: ['name', 'directives'],
83401
+ InlineFragment: ['typeCondition', 'directives', 'selectionSet'],
83402
+ FragmentDefinition: ['name', // Note: fragment variable definitions are experimental and may be changed
83403
+ // or removed in the future.
83404
+ 'variableDefinitions', 'typeCondition', 'directives', 'selectionSet'],
83405
+ IntValue: [],
83406
+ FloatValue: [],
83407
+ StringValue: [],
83408
+ BooleanValue: [],
83409
+ NullValue: [],
83410
+ EnumValue: [],
83411
+ ListValue: ['values'],
83412
+ ObjectValue: ['fields'],
83413
+ ObjectField: ['name', 'value'],
83414
+ Directive: ['name', 'arguments'],
83415
+ NamedType: ['name'],
83416
+ ListType: ['type'],
83417
+ NonNullType: ['type'],
83418
+ SchemaDefinition: ['description', 'directives', 'operationTypes'],
83419
+ OperationTypeDefinition: ['type'],
83420
+ ScalarTypeDefinition: ['description', 'name', 'directives'],
83421
+ ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],
83422
+ FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],
83423
+ InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'],
83424
+ InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],
83425
+ UnionTypeDefinition: ['description', 'name', 'directives', 'types'],
83426
+ EnumTypeDefinition: ['description', 'name', 'directives', 'values'],
83427
+ EnumValueDefinition: ['description', 'name', 'directives'],
83428
+ InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],
83429
+ DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],
83430
+ SchemaExtension: ['directives', 'operationTypes'],
83431
+ ScalarTypeExtension: ['name', 'directives'],
83432
+ ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],
83433
+ InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],
83434
+ UnionTypeExtension: ['name', 'directives', 'types'],
83435
+ EnumTypeExtension: ['name', 'directives', 'values'],
83436
+ InputObjectTypeExtension: ['name', 'directives', 'fields']
83437
+ };
83438
+ var BREAK = Object.freeze({});
83439
+ /**
83440
+ * visit() will walk through an AST using a depth-first traversal, calling
83441
+ * the visitor's enter function at each node in the traversal, and calling the
83442
+ * leave function after visiting that node and all of its child nodes.
83443
+ *
83444
+ * By returning different values from the enter and leave functions, the
83445
+ * behavior of the visitor can be altered, including skipping over a sub-tree of
83446
+ * the AST (by returning false), editing the AST by returning a value or null
83447
+ * to remove the value, or to stop the whole traversal by returning BREAK.
83448
+ *
83449
+ * When using visit() to edit an AST, the original AST will not be modified, and
83450
+ * a new version of the AST with the changes applied will be returned from the
83451
+ * visit function.
83452
+ *
83453
+ * const editedAST = visit(ast, {
83454
+ * enter(node, key, parent, path, ancestors) {
83455
+ * // @return
83456
+ * // undefined: no action
83457
+ * // false: skip visiting this node
83458
+ * // visitor.BREAK: stop visiting altogether
83459
+ * // null: delete this node
83460
+ * // any value: replace this node with the returned value
83461
+ * },
83462
+ * leave(node, key, parent, path, ancestors) {
83463
+ * // @return
83464
+ * // undefined: no action
83465
+ * // false: no action
83466
+ * // visitor.BREAK: stop visiting altogether
83467
+ * // null: delete this node
83468
+ * // any value: replace this node with the returned value
83469
+ * }
83470
+ * });
83471
+ *
83472
+ * Alternatively to providing enter() and leave() functions, a visitor can
83473
+ * instead provide functions named the same as the kinds of AST nodes, or
83474
+ * enter/leave visitors at a named key, leading to four permutations of the
83475
+ * visitor API:
83476
+ *
83477
+ * 1) Named visitors triggered when entering a node of a specific kind.
83478
+ *
83479
+ * visit(ast, {
83480
+ * Kind(node) {
83481
+ * // enter the "Kind" node
83482
+ * }
83483
+ * })
83484
+ *
83485
+ * 2) Named visitors that trigger upon entering and leaving a node of
83486
+ * a specific kind.
83487
+ *
83488
+ * visit(ast, {
83489
+ * Kind: {
83490
+ * enter(node) {
83491
+ * // enter the "Kind" node
83492
+ * }
83493
+ * leave(node) {
83494
+ * // leave the "Kind" node
83495
+ * }
83496
+ * }
83497
+ * })
83498
+ *
83499
+ * 3) Generic visitors that trigger upon entering and leaving any node.
83500
+ *
83501
+ * visit(ast, {
83502
+ * enter(node) {
83503
+ * // enter any node
83504
+ * },
83505
+ * leave(node) {
83506
+ * // leave any node
83507
+ * }
83508
+ * })
83509
+ *
83510
+ * 4) Parallel visitors for entering and leaving nodes of a specific kind.
83511
+ *
83512
+ * visit(ast, {
83513
+ * enter: {
83514
+ * Kind(node) {
83515
+ * // enter the "Kind" node
83516
+ * }
83517
+ * },
83518
+ * leave: {
83519
+ * Kind(node) {
83520
+ * // leave the "Kind" node
83521
+ * }
83522
+ * }
83523
+ * })
83524
+ */
83525
+
83526
+ function visit(root, visitor) {
83527
+ var visitorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : QueryDocumentKeys;
83528
+
83529
+ /* eslint-disable no-undef-init */
83530
+ var stack = undefined;
83531
+ var inArray = Array.isArray(root);
83532
+ var keys = [root];
83533
+ var index = -1;
83534
+ var edits = [];
83535
+ var node = undefined;
83536
+ var key = undefined;
83537
+ var parent = undefined;
83538
+ var path = [];
83539
+ var ancestors = [];
83540
+ var newRoot = root;
83541
+ /* eslint-enable no-undef-init */
83542
+
83543
+ do {
83544
+ index++;
83545
+ var isLeaving = index === keys.length;
83546
+ var isEdited = isLeaving && edits.length !== 0;
83547
+
83548
+ if (isLeaving) {
83549
+ key = ancestors.length === 0 ? undefined : path[path.length - 1];
83550
+ node = parent;
83551
+ parent = ancestors.pop();
83552
+
83553
+ if (isEdited) {
83554
+ if (inArray) {
83555
+ node = node.slice();
83556
+ } else {
83557
+ var clone = {};
83558
+
83559
+ for (var _i2 = 0, _Object$keys2 = Object.keys(node); _i2 < _Object$keys2.length; _i2++) {
83560
+ var k = _Object$keys2[_i2];
83561
+ clone[k] = node[k];
83562
+ }
83563
+
83564
+ node = clone;
83565
+ }
83566
+
83567
+ var editOffset = 0;
83568
+
83569
+ for (var ii = 0; ii < edits.length; ii++) {
83570
+ var editKey = edits[ii][0];
83571
+ var editValue = edits[ii][1];
83572
+
83573
+ if (inArray) {
83574
+ editKey -= editOffset;
83575
+ }
83576
+
83577
+ if (inArray && editValue === null) {
83578
+ node.splice(editKey, 1);
83579
+ editOffset++;
83580
+ } else {
83581
+ node[editKey] = editValue;
83582
+ }
83583
+ }
83584
+ }
83585
+
83586
+ index = stack.index;
83587
+ keys = stack.keys;
83588
+ edits = stack.edits;
83589
+ inArray = stack.inArray;
83590
+ stack = stack.prev;
83591
+ } else {
83592
+ key = parent ? inArray ? index : keys[index] : undefined;
83593
+ node = parent ? parent[key] : newRoot;
83594
+
83595
+ if (node === null || node === undefined) {
83596
+ continue;
83597
+ }
83598
+
83599
+ if (parent) {
83600
+ path.push(key);
83601
+ }
83602
+ }
83603
+
83604
+ var result = void 0;
83605
+
83606
+ if (!Array.isArray(node)) {
83607
+ if (!isNode(node)) {
83608
+ throw new Error("Invalid AST Node: ".concat(inspect(node), "."));
83609
+ }
83610
+
83611
+ var visitFn = getVisitFn(visitor, node.kind, isLeaving);
83612
+
83613
+ if (visitFn) {
83614
+ result = visitFn.call(visitor, node, key, parent, path, ancestors);
83615
+
83616
+ if (result === BREAK) {
83617
+ break;
83618
+ }
83619
+
83620
+ if (result === false) {
83621
+ if (!isLeaving) {
83622
+ path.pop();
83623
+ continue;
83624
+ }
83625
+ } else if (result !== undefined) {
83626
+ edits.push([key, result]);
83627
+
83628
+ if (!isLeaving) {
83629
+ if (isNode(result)) {
83630
+ node = result;
83631
+ } else {
83632
+ path.pop();
83633
+ continue;
83634
+ }
83635
+ }
83636
+ }
83637
+ }
83638
+ }
83639
+
83640
+ if (result === undefined && isEdited) {
83641
+ edits.push([key, node]);
83642
+ }
83643
+
83644
+ if (isLeaving) {
83645
+ path.pop();
83646
+ } else {
83647
+ var _visitorKeys$node$kin;
83648
+
83649
+ stack = {
83650
+ inArray: inArray,
83651
+ index: index,
83652
+ keys: keys,
83653
+ edits: edits,
83654
+ prev: stack
83655
+ };
83656
+ inArray = Array.isArray(node);
83657
+ keys = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
83658
+ index = -1;
83659
+ edits = [];
83660
+
83661
+ if (parent) {
83662
+ ancestors.push(parent);
83663
+ }
83664
+
83665
+ parent = node;
83666
+ }
83667
+ } while (stack !== undefined);
83668
+
83669
+ if (edits.length !== 0) {
83670
+ newRoot = edits[edits.length - 1][1];
83671
+ }
83672
+
83673
+ return newRoot;
83674
+ }
83675
+ /**
83676
+ * Given a visitor instance, if it is leaving or not, and a node kind, return
83677
+ * the function the visitor runtime should call.
83678
+ */
83679
+
83680
+ function getVisitFn(visitor, kind, isLeaving) {
83681
+ var kindVisitor = visitor[kind];
83682
+
83683
+ if (kindVisitor) {
83684
+ if (!isLeaving && typeof kindVisitor === 'function') {
83685
+ // { Kind() {} }
83686
+ return kindVisitor;
83687
+ }
83688
+
83689
+ var kindSpecificVisitor = isLeaving ? kindVisitor.leave : kindVisitor.enter;
83690
+
83691
+ if (typeof kindSpecificVisitor === 'function') {
83692
+ // { Kind: { enter() {}, leave() {} } }
83693
+ return kindSpecificVisitor;
83694
+ }
83695
+ } else {
83696
+ var specificVisitor = isLeaving ? visitor.leave : visitor.enter;
83697
+
83698
+ if (specificVisitor) {
83699
+ if (typeof specificVisitor === 'function') {
83700
+ // { enter() {}, leave() {} }
83701
+ return specificVisitor;
83702
+ }
83703
+
83704
+ var specificKindVisitor = specificVisitor[kind];
83705
+
83706
+ if (typeof specificKindVisitor === 'function') {
83707
+ // { enter: { Kind() {} }, leave: { Kind() {} } }
83708
+ return specificKindVisitor;
83709
+ }
83710
+ }
83711
+ }
83712
+ }
83713
+
83049
83714
  /**
83050
83715
  * Copyright (c) 2022, Salesforce, Inc.,
83051
83716
  * All rights reserved.
@@ -84517,6 +85182,12 @@ function isObjectValueNode(node) {
84517
85182
  function isStringValueNode(node) {
84518
85183
  return node.kind === Kind$1.STRING;
84519
85184
  }
85185
+ function isIntValueNode(node) {
85186
+ return node.kind === Kind$1.INT;
85187
+ }
85188
+ function isVariableNode(node) {
85189
+ return node.kind === Kind$1.VARIABLE;
85190
+ }
84520
85191
  function isFieldNode(node) {
84521
85192
  return node !== undefined && node.kind !== undefined ? node.kind === 'Field' : false;
84522
85193
  }
@@ -85511,7 +86182,7 @@ function mapCursorValue(originalValue, paginationMetadata) {
85511
86182
  async function mapPaginationCursors(originalAST, variables, store) {
85512
86183
  // first pass, identify record query cache keys for reading pagination metadata
85513
86184
  let requiredPaginationMetadataKeys = [];
85514
- visit(originalAST, {
86185
+ visit$1(originalAST, {
85515
86186
  Field(node, _key, _parent, _path, ancestors) {
85516
86187
  // is it a record query?
85517
86188
  if (!isRecordQuery(node)) {
@@ -85539,7 +86210,7 @@ async function mapPaginationCursors(originalAST, variables, store) {
85539
86210
  // holds the original cursor values that were mapped back to server cursors
85540
86211
  let mappedCursors = new Map();
85541
86212
  // rewrite nodes/variables with mapped cursors now that we read the pagination metadata
85542
- let ast = visit(originalAST, {
86213
+ let ast = visit$1(originalAST, {
85543
86214
  Field(node, _key, _parent, _path, ancestors) {
85544
86215
  // is it a record query?
85545
86216
  if (!isRecordQuery(node)) {
@@ -86554,7 +87225,7 @@ async function evaluate(config, observers, settings, objectInfos, store, snapsho
86554
87225
  const operationNode = getOperationFromDocument$1(config.query);
86555
87226
  let topLevelQueries = [];
86556
87227
  // assume that 'config.query' has required injected fields.
86557
- const modifiedAST = visit(config.query, {
87228
+ const modifiedAST = visit$1(config.query, {
86558
87229
  Field: {
86559
87230
  leave(node) {
86560
87231
  if (node.name.value !== `node`)
@@ -86694,7 +87365,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
86694
87365
  unmappedDraftIDs: new Set(),
86695
87366
  };
86696
87367
  let assignedtomeQueryFieldNode = undefined;
86697
- visit(originalAST, {
87368
+ visit$1(originalAST, {
86698
87369
  Argument: {
86699
87370
  enter(node, key, parent, path, ancestors) {
86700
87371
  const { connection: recordConnectionNode, path: ancesterPath } = findNearestConnectionWithPath(ancestors);
@@ -86766,7 +87437,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
86766
87437
  objectInfos = await resolveObjectInfos(objectNodeInfoTree, pathToObjectApiNamesMap, startNodes, objectInfoService);
86767
87438
  }
86768
87439
  // read pass; gather whats needed
86769
- visit(originalAST, {
87440
+ visit$1(originalAST, {
86770
87441
  Argument: {
86771
87442
  leave(node, key, parent, path, ancestors) {
86772
87443
  const recordQueryField = findNearestConnection(ancestors);
@@ -86851,7 +87522,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
86851
87522
  },
86852
87523
  });
86853
87524
  // write pass; inject whats needed
86854
- const modifiedAST = visit(originalAST, {
87525
+ const modifiedAST = visit$1(originalAST, {
86855
87526
  Field: {
86856
87527
  leave(node, key, parent, path, ancestors) {
86857
87528
  // removes 'ServicesResources' query field node if 'assignedtome' scope shows up
@@ -88268,8 +88939,9 @@ function createErrorSnapshot(result, snapshot) {
88268
88939
  },
88269
88940
  };
88270
88941
  }
88271
- function createLocalEvalSnapshot(data, seenRecords, recordId, rebuildWithLocalEval) {
88942
+ function createLocalEvalSnapshot(data, seenRecords, recordId, rebuildWithLocalEval, refresh) {
88272
88943
  return {
88944
+ refresh,
88273
88945
  recordId,
88274
88946
  variables: {},
88275
88947
  seenRecords,
@@ -88380,7 +89052,7 @@ function instrumentLimits(ast, variables) {
88380
89052
  let currentChildRelationships = 0;
88381
89053
  let currentRootRecordCount = 0;
88382
89054
  let currentTotalRecordCount = 0;
88383
- visit(ast, {
89055
+ visit$1(ast, {
88384
89056
  Field: {
88385
89057
  enter(node) {
88386
89058
  if (isRecordQuery(node)) {
@@ -88431,6 +89103,95 @@ function limitForQuery(field, variables) {
88431
89103
  return first;
88432
89104
  }
88433
89105
 
89106
+ const MAX_RECORD_QUERY_FIELD_COUNT = 100;
89107
+ const MAX_RECORD_QUERY_LIMIT = 200;
89108
+ function enforceFieldLimitOnAST(ast, variables, enforcedLimits = {
89109
+ maxFieldCount: MAX_RECORD_QUERY_FIELD_COUNT,
89110
+ maxRecordLimit: MAX_RECORD_QUERY_LIMIT,
89111
+ }) {
89112
+ const { maxFieldCount, maxRecordLimit } = enforcedLimits;
89113
+ const documentNode = visit(ast, {
89114
+ Field(node) {
89115
+ // is it a record query?
89116
+ if (!isRecordQuery(node)) {
89117
+ return;
89118
+ }
89119
+ // check to see that we have the `first` argument defined
89120
+ if (node.arguments === undefined)
89121
+ return false;
89122
+ let first = node.arguments.find((node) => {
89123
+ return node.name.value === 'first';
89124
+ });
89125
+ if (first === undefined)
89126
+ return false;
89127
+ if (isIntValueNode(first.value) || isVariableNode(first.value)) {
89128
+ // total number of requested fields in a record query
89129
+ const fieldCount = findRecordQueryNodeFieldCount(node);
89130
+ if (isIntValueNode(first.value)) {
89131
+ const originalValue = Number(first.value.value);
89132
+ if (isNaN(originalValue))
89133
+ return false;
89134
+ // if the `first` value is already less than the `maxRecordLimit`
89135
+ // or the field count is less than `maxFieldCount` then
89136
+ // there is no need to update the argument node value
89137
+ if (originalValue <= maxRecordLimit || fieldCount <= maxFieldCount)
89138
+ return false;
89139
+ // else we cap the truncated limit
89140
+ return {
89141
+ ...node,
89142
+ arguments: node.arguments.map((argument) => {
89143
+ if (argument !== first)
89144
+ return argument;
89145
+ return {
89146
+ ...argument,
89147
+ value: {
89148
+ kind: Kind.INT,
89149
+ value: maxRecordLimit,
89150
+ },
89151
+ };
89152
+ }),
89153
+ };
89154
+ }
89155
+ else if (isVariableNode(first.value) && variables !== undefined) {
89156
+ const variableName = first.value.name.value;
89157
+ // ensure the variable is a number
89158
+ const variableValue = Number(variables[variableName]);
89159
+ if (isNaN(variableValue))
89160
+ return;
89161
+ // if the variable is less than the `maxRecordLimit` or
89162
+ // field count is less then `maxFieldCount`
89163
+ // then there is no need to alter the variable
89164
+ if (variableValue <= maxRecordLimit || fieldCount <= maxFieldCount)
89165
+ return;
89166
+ // else we update the variable to the truncated limited
89167
+ variables[variableName] = maxRecordLimit;
89168
+ }
89169
+ }
89170
+ },
89171
+ });
89172
+ return documentNode;
89173
+ }
89174
+ /**
89175
+ * Count all the requested fields to be returned in the users request
89176
+ * @param recordQueryNode
89177
+ * @returns
89178
+ */
89179
+ function findRecordQueryNodeFieldCount(recordQueryNode) {
89180
+ if (recordQueryNode.selectionSet === undefined)
89181
+ return 0;
89182
+ const edges = recordQueryNode.selectionSet.selections.filter(isFieldNode).find((node) => {
89183
+ return node.name.value === 'edges';
89184
+ });
89185
+ if (edges === undefined || edges.selectionSet === undefined)
89186
+ return 0;
89187
+ const node = edges.selectionSet.selections.filter(isFieldNode).find((node) => {
89188
+ return node.name.value === 'node';
89189
+ });
89190
+ if (node === undefined || node.selectionSet === undefined)
89191
+ return 0;
89192
+ return node.selectionSet.selections.length || 0;
89193
+ }
89194
+
88434
89195
  function generateUniqueRecordId() {
88435
89196
  return `UiApi::GraphQLRepresentation:${Date.now() + Math.random().toFixed(5).split('.')[1]}`;
88436
89197
  }
@@ -88488,11 +89249,11 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
88488
89249
  isDraftId,
88489
89250
  getCanonicalId,
88490
89251
  };
89252
+ const eventEmitter = createCustomAdapterEventEmitter(GRAPHQL_EVAL_NAMESPACE, requestContext.eventObservers || []);
88491
89253
  try {
88492
89254
  // NB: This occurs BEFORE synthetic field injection on purpose to
88493
89255
  // ensure we don't charge the caller for spanning records we inject
88494
89256
  // on their behalf.
88495
- const eventEmitter = createCustomAdapterEventEmitter(GRAPHQL_EVAL_NAMESPACE, requestContext.eventObservers || []);
88496
89257
  const queryInstrumentation = instrumentLimits(copy, config.variables || {});
88497
89258
  eventEmitter({
88498
89259
  type: 'graphql-query-instrumentation',
@@ -88502,12 +89263,17 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
88502
89263
  catch (_a) {
88503
89264
  // ignore errors instrumenting limits
88504
89265
  }
89266
+ let fieldLimitedAST = copy;
89267
+ if (graphqQueryFieldLimit.isOpen({ fallback: true })) {
89268
+ // enfore server field count limits on the AST
89269
+ fieldLimitedAST = enforceFieldLimitOnAST(copy, config.variables || {});
89270
+ }
88505
89271
  try {
88506
89272
  ({
88507
89273
  modifiedAST: injectedAST,
88508
89274
  objectInfos: objectInfoNeeded,
88509
89275
  unmappedDraftIDs,
88510
- } = await injectSyntheticFields(copy, objectInfoService, draftFunctions, config.variables));
89276
+ } = await injectSyntheticFields(fieldLimitedAST, objectInfoService, draftFunctions, config.variables));
88511
89277
  ({ ast: cursorMappedAST, mappedCursors } = await mapPaginationCursors(injectedAST, config.variables || {}, store));
88512
89278
  if (config.variables) {
88513
89279
  config.variables = replaceDraftIdsInVariables(config.variables, draftFunctions, unmappedDraftIDs);
@@ -88624,7 +89390,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
88624
89390
  // the error is network error or 504), otherwise we spread over
88625
89391
  // the non-eval'ed snapshot (which will be either Fulfilled or Stale)
88626
89392
  const resultSnapshot = nonEvaluatedSnapshot.state === 'Error'
88627
- ? createLocalEvalSnapshot(gqlResult, seenRecords, recordId, rebuildWithLocalEval)
89393
+ ? createLocalEvalSnapshot(gqlResult, seenRecords, recordId, rebuildWithLocalEval, nonEvaluatedSnapshot.refresh)
88628
89394
  : {
88629
89395
  ...nonEvaluatedSnapshot,
88630
89396
  data: gqlResult,
@@ -88647,6 +89413,9 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
88647
89413
  },
88648
89414
  };
88649
89415
  }
89416
+ if (refresh === undefined) {
89417
+ eventEmitter({ type: 'graphql-luvio-refresh-undefined' });
89418
+ }
88650
89419
  if (possibleStaleRecordMap.size > 0) {
88651
89420
  initiateStaleRecordRefresh(luvio, possibleStaleRecordMap);
88652
89421
  resultSnapshot.state = 'Stale';
@@ -89718,7 +90487,7 @@ function makeNetworkAdapterChunkRecordFields(networkAdapter, instrumentationSink
89718
90487
 
89719
90488
  const { keys: keys$2$1, create: create$2$1, assign: assign$2, entries: entries$2 } = Object;
89720
90489
  const { stringify: stringify$1, parse: parse$1 } = JSON;
89721
- const { push: push$4, join, slice } = Array.prototype;
90490
+ const { push: push$4, join, slice, shift } = Array.prototype;
89722
90491
 
89723
90492
  // so eslint doesn't complain about nimbus
89724
90493
  /* global __nimbus */
@@ -89859,6 +90628,11 @@ const GRAPHQL_EVAL_MAX_CHILD_RELATIONSHIPS_COUNT = 'gql-eval-max-child-count';
89859
90628
  const GRAPHQL_EVAL_QUERY_RECORD_COUNT = 'gql-eval-query-record-count';
89860
90629
  const DRAFT_QUEUE_TOTAL_MERGE_ACTIONS_CALLS = 'draft-queue-total-mergeActions-calls';
89861
90630
  const ldsMobileInstrumentation$1 = getInstrumentation();
90631
+ const nimbusLogger = typeof __nimbus !== 'undefined' &&
90632
+ __nimbus.plugins !== undefined &&
90633
+ __nimbus.plugins.JSLoggerPlugin !== undefined
90634
+ ? __nimbus.plugins.JSLoggerPlugin
90635
+ : undefined;
89862
90636
  function reportGraphqlQueryParseError(err) {
89863
90637
  normalizeError$1(err);
89864
90638
  }
@@ -89880,6 +90654,16 @@ function reportGraphqlQueryInstrumentation(data) {
89880
90654
  ldsMobileInstrumentation$1.bucketValue(GRAPHQL_EVAL_MAX_CHILD_RELATIONSHIPS_COUNT, data.maxChildRelationships, queryBuckets);
89881
90655
  ldsMobileInstrumentation$1.bucketValue(GRAPHQL_EVAL_QUERY_RECORD_COUNT, data.requestedRecordCount, recordBuckets);
89882
90656
  }
90657
+ function reportDraftActionEvent(state, draftCount, message) {
90658
+ if (nimbusLogger) {
90659
+ nimbusLogger.logInfo(`Draft action event: ${state}, depth: ${draftCount}${message ? `, message: ${message}` : ''}`);
90660
+ }
90661
+ }
90662
+ function reportDraftQueueState(state, draftCount) {
90663
+ if (nimbusLogger) {
90664
+ nimbusLogger.logInfo(`Draft state changed: ${state}, depth: ${draftCount}`);
90665
+ }
90666
+ }
89883
90667
  function reportDraftAwareContentDocumentVersionSynthesizeError(err) {
89884
90668
  let error;
89885
90669
  if (err.body !== undefined) {
@@ -89925,43 +90709,73 @@ const withInstrumentation = (operation, config) => {
89925
90709
  * A HOF that returns an instrumented DraftQueue
89926
90710
  */
89927
90711
  function instrumentDraftQueue(queue) {
89928
- queue.registerOnChangedListener((draftQueueEvent) => {
90712
+ const mergeActions = function (targetActionId, sourceActionId) {
90713
+ return withInstrumentation(() => queue.mergeActions(targetActionId, sourceActionId), {
90714
+ metricName: DRAFT_QUEUE_TOTAL_MERGE_ACTIONS_CALLS,
90715
+ tags: {},
90716
+ logError: false,
90717
+ });
90718
+ };
90719
+ const overriddenQueue = create$2$1(queue, { mergeActions: { value: mergeActions } });
90720
+ overriddenQueue.registerOnChangedListener((draftQueueEvent) => {
89929
90721
  switch (draftQueueEvent.type) {
89930
- case DraftQueueEventType.QueueStateChanged:
90722
+ case DraftQueueEventType.QueueStateChanged: {
89931
90723
  switch (draftQueueEvent.state) {
89932
90724
  case DraftQueueState.Error:
90725
+ reportDraftQueueState('error', draftQueueEvent.draftCount);
89933
90726
  break;
89934
90727
  case DraftQueueState.Started:
90728
+ reportDraftQueueState('started', draftQueueEvent.draftCount);
89935
90729
  break;
89936
90730
  case DraftQueueState.Stopped:
90731
+ reportDraftQueueState('stopped', draftQueueEvent.draftCount);
89937
90732
  break;
89938
90733
  case DraftQueueState.Waiting:
90734
+ reportDraftQueueState('waiting', draftQueueEvent.draftCount);
89939
90735
  break;
89940
90736
  }
89941
90737
  break;
90738
+ }
89942
90739
  case DraftQueueEventType.ActionAdded:
90740
+ reportDraftActionEvent('added', draftQueueEvent.draftCount);
89943
90741
  break;
89944
90742
  case DraftQueueEventType.ActionUploading:
90743
+ reportDraftActionEvent('uploading', draftQueueEvent.draftCount);
89945
90744
  break;
89946
90745
  case DraftQueueEventType.ActionCompleted:
90746
+ reportDraftActionEvent('completed', draftQueueEvent.draftCount);
89947
90747
  break;
89948
90748
  case DraftQueueEventType.ActionDeleted:
90749
+ reportDraftActionEvent('deleted', draftQueueEvent.draftCount);
89949
90750
  break;
89950
90751
  case DraftQueueEventType.ActionFailed:
90752
+ {
90753
+ const failedEvent = draftQueueEvent;
90754
+ const failureMessage = obtainFailureMessage(failedEvent.action.error);
90755
+ reportDraftActionEvent('failed', draftQueueEvent.draftCount, failureMessage);
90756
+ }
89951
90757
  break;
89952
90758
  case DraftQueueEventType.ActionUpdated:
90759
+ reportDraftActionEvent('updated', draftQueueEvent.draftCount);
89953
90760
  break;
89954
90761
  }
89955
90762
  return Promise.resolve();
89956
90763
  });
89957
- const mergeActions = function (targetActionId, sourceActionId) {
89958
- return withInstrumentation(() => queue.mergeActions(targetActionId, sourceActionId), {
89959
- metricName: DRAFT_QUEUE_TOTAL_MERGE_ACTIONS_CALLS,
89960
- tags: {},
89961
- logError: false,
89962
- });
89963
- };
89964
- return create$2$1(queue, { mergeActions: { value: mergeActions } });
90764
+ return overriddenQueue;
90765
+ }
90766
+ function obtainFailureMessage(error) {
90767
+ if (error instanceof Error) {
90768
+ return error.message;
90769
+ }
90770
+ else if (typeof error === 'string') {
90771
+ return error;
90772
+ }
90773
+ else if (error.status && error.statusText) {
90774
+ return `status=${error.status}-${error.statusText}`;
90775
+ }
90776
+ else {
90777
+ return JSON.stringify(error);
90778
+ }
89965
90779
  }
89966
90780
 
89967
90781
  // so eslint doesn't complain about nimbus
@@ -90167,6 +90981,10 @@ class ObjectInfoService {
90167
90981
  }
90168
90982
  return objectInfos;
90169
90983
  }
90984
+ async getObjectInfo(apiName) {
90985
+ const map = await this.getObjectInfos([apiName]);
90986
+ return map[apiName];
90987
+ }
90170
90988
  async getObjectInfoDirectory() {
90171
90989
  const snapshot = await this.getObjectInfoDirectoryAdapter({});
90172
90990
  if (!snapshot ||
@@ -92417,7 +93235,7 @@ function stripMetaschemaFromFieldNode$1(fieldNode) {
92417
93235
  return fieldNode;
92418
93236
  }
92419
93237
  function stripDocumentOfMetaschema$1(documentNode) {
92420
- return visit(documentNode, {
93238
+ return visit$1(documentNode, {
92421
93239
  Field(node) {
92422
93240
  return stripMetaschemaFromFieldNode$1(node);
92423
93241
  },
@@ -93072,7 +93890,7 @@ register$1({
93072
93890
  id: '@salesforce/lds-network-adapter',
93073
93891
  instrument: instrument$2,
93074
93892
  });
93075
- // version: 1.315.0-8ef4c90baf
93893
+ // version: 1.316.0-fd56ed976d
93076
93894
 
93077
93895
  const { create: create$2, keys: keys$2 } = Object;
93078
93896
  const { stringify, parse } = JSON;
@@ -114313,7 +115131,7 @@ function stripMetaschemaFromFieldNode(fieldNode) {
114313
115131
  return fieldNode;
114314
115132
  }
114315
115133
  function stripDocumentOfMetaschema(documentNode) {
114316
- return visit(documentNode, {
115134
+ return visit$1(documentNode, {
114317
115135
  Field(node) {
114318
115136
  return stripMetaschemaFromFieldNode(node);
114319
115137
  },
@@ -115650,7 +116468,7 @@ register$1({
115650
116468
  configuration: { ...configurationForGraphQLAdapters$1 },
115651
116469
  instrument: instrument$1,
115652
116470
  });
115653
- // version: 1.315.0-b7eff13c6d
116471
+ // version: 1.316.0-4453f1e2b6
115654
116472
 
115655
116473
  // On core the unstable adapters are re-exported with different names,
115656
116474
  // we want to match them here.
@@ -115802,7 +116620,7 @@ withDefaultLuvio((luvio) => {
115802
116620
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
115803
116621
  graphQLImperative = ldsAdapter;
115804
116622
  });
115805
- // version: 1.315.0-b7eff13c6d
116623
+ // version: 1.316.0-4453f1e2b6
115806
116624
 
115807
116625
  var gqlApi = /*#__PURE__*/Object.freeze({
115808
116626
  __proto__: null,
@@ -116558,7 +117376,7 @@ const callbacks$1 = [];
116558
117376
  function register(r) {
116559
117377
  callbacks$1.forEach((callback) => callback(r));
116560
117378
  }
116561
- // version: 1.315.0-8ef4c90baf
117379
+ // version: 1.316.0-fd56ed976d
116562
117380
 
116563
117381
  /**
116564
117382
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -117621,4 +118439,4 @@ const { luvio } = getRuntime();
117621
118439
  setDefaultLuvio({ luvio });
117622
118440
 
117623
118441
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
117624
- // version: 1.315.0-8ef4c90baf
118442
+ // version: 1.316.0-fd56ed976d