relay-runtime 0.0.0-main-feaba45d → 0.0.0-main-b23fe58e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/experimental.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-feaba45d
2
+ * Relay v0.0.0-main-b23fe58e
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-feaba45d
2
+ * Relay v0.0.0-main-b23fe58e
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
@@ -436,7 +436,7 @@ var RelayReader = /*#__PURE__*/function () {
436
436
  getDataForResolverFragment: getDataForResolverFragment
437
437
  };
438
438
  return withResolverContext(resolverContext, function () {
439
- var _getResolverValue = getResolverValue(field, _this._variables, key, _this._fragmentName),
439
+ var _getResolverValue = getResolverValue(field, _this._variables, key),
440
440
  resolverResult = _getResolverValue[0],
441
441
  resolverError = _getResolverValue[1];
442
442
  return {
@@ -446,7 +446,7 @@ var RelayReader = /*#__PURE__*/function () {
446
446
  };
447
447
  });
448
448
  } else {
449
- var _getResolverValue2 = getResolverValue(field, _this._variables, null, _this._fragmentName),
449
+ var _getResolverValue2 = getResolverValue(field, _this._variables, null),
450
450
  resolverResult = _getResolverValue2[0],
451
451
  _resolverError = _getResolverValue2[1];
452
452
  return {
@@ -463,7 +463,17 @@ var RelayReader = /*#__PURE__*/function () {
463
463
  cachedSnapshot = _this$_resolverCache$[3],
464
464
  suspenseID = _this$_resolverCache$[4],
465
465
  updatedDataIDs = _this$_resolverCache$[5];
466
+ this._propogateResolverMetadata(field.path, cachedSnapshot, resolverError, seenRecord, suspenseID, updatedDataIDs);
467
+ var applicationName = (_field$alias = field.alias) !== null && _field$alias !== void 0 ? _field$alias : field.name;
468
+ data[applicationName] = result;
469
+ return result;
470
+ }
466
471
 
472
+ // Reading a resolver field can uncover missing data, errors, suspense,
473
+ // additional seen records and updated dataIDs. All of these facts must be
474
+ // represented in the snapshot we return for this fragment.
475
+ ;
476
+ _proto._propogateResolverMetadata = function _propogateResolverMetadata(fieldPath, cachedSnapshot, resolverError, seenRecord, suspenseID, updatedDataIDs) {
467
477
  // The resolver's root fragment (if there is one) may be missing data, have
468
478
  // errors, or be in a suspended state. Here we propagate those cases
469
479
  // upwards to mimic the behavior of having traversed into that fragment directly.
@@ -519,7 +529,13 @@ var RelayReader = /*#__PURE__*/function () {
519
529
  // the errors can be attached to this read's snapshot. This allows the error
520
530
  // to be logged.
521
531
  if (resolverError) {
522
- this._resolverErrors.push(resolverError);
532
+ this._resolverErrors.push({
533
+ field: {
534
+ path: fieldPath,
535
+ owner: this._fragmentName
536
+ },
537
+ error: resolverError
538
+ });
523
539
  }
524
540
 
525
541
  // The resolver itself creates a record in the store. We record that we've
@@ -537,7 +553,7 @@ var RelayReader = /*#__PURE__*/function () {
537
553
  if (suspenseID != null) {
538
554
  this._isMissingData = true;
539
555
  this._missingLiveResolverFields.push({
540
- path: "".concat(this._fragmentName, ".").concat(field.path),
556
+ path: "".concat(this._fragmentName, ".").concat(fieldPath),
541
557
  liveStateID: suspenseID
542
558
  });
543
559
  }
@@ -555,9 +571,6 @@ var RelayReader = /*#__PURE__*/function () {
555
571
  _iterator4.f();
556
572
  }
557
573
  }
558
- var applicationName = (_field$alias = field.alias) !== null && _field$alias !== void 0 ? _field$alias : field.name;
559
- data[applicationName] = result;
560
- return result;
561
574
  };
562
575
  _proto._readClientEdge = function _readClientEdge(field, record, data) {
563
576
  var _backingField$alias;
@@ -875,7 +888,7 @@ var RelayReader = /*#__PURE__*/function () {
875
888
  // throw `RESOLVER_FRAGMENT_MISSING_DATA_SENTINEL`. This function ensures that
876
889
  // we catch that error and instead create an error object which can be
877
890
  // propagated to the reader snapshot.
878
- function getResolverValue(field, variables, fragmentKey, ownerName) {
891
+ function getResolverValue(field, variables, fragmentKey) {
879
892
  // Support for languages that work (best) with ES6 modules, such as TypeScript.
880
893
  var resolverFunction = typeof field.resolverModule === 'function' ? field.resolverModule : field.resolverModule["default"];
881
894
  var resolverResult = null;
@@ -892,16 +905,7 @@ function getResolverValue(field, variables, fragmentKey, ownerName) {
892
905
  if (e === RESOLVER_FRAGMENT_MISSING_DATA_SENTINEL) {
893
906
  resolverResult = undefined;
894
907
  } else {
895
- var _field$path;
896
- // `field.path` is typed as nullable while we rollout compiler changes.
897
- var path = (_field$path = field.path) !== null && _field$path !== void 0 ? _field$path : '[UNKNOWN]';
898
- resolverError = {
899
- field: {
900
- path: path,
901
- owner: ownerName
902
- },
903
- error: e
904
- };
908
+ resolverError = e;
905
909
  }
906
910
  }
907
911
  return [resolverResult, resolverError];
@@ -97,11 +97,14 @@ var LiveResolverCache = /*#__PURE__*/function () {
97
97
  linkedID = (_linkedID = linkedID) !== null && _linkedID !== void 0 ? _linkedID : generateClientID(recordID, storageKey);
98
98
  linkedRecord = RelayModernRecord.create(linkedID, RELAY_RESOLVER_RECORD_TYPENAME);
99
99
  var evaluationResult = evaluate();
100
+ RelayModernRecord.setValue(linkedRecord, RELAY_RESOLVER_SNAPSHOT_KEY, evaluationResult.snapshot);
101
+ RelayModernRecord.setValue(linkedRecord, RELAY_RESOLVER_ERROR_KEY, evaluationResult.error);
100
102
  if (field.kind === RELAY_LIVE_RESOLVER) {
101
- if (evaluationResult.resolverResult != undefined) {
103
+ if (evaluationResult.resolverResult != null) {
102
104
  if (process.env.NODE_ENV !== "production") {
103
105
  !isLiveStateValue(evaluationResult.resolverResult) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Expected the @live Relay Resolver backing the field "%s" to return a value ' + 'that implements LiveState. Did you mean to remove the @live annotation on this resolver?', field.path) : invariant(false) : void 0;
104
106
  }
107
+ !(evaluationResult.error == null) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Did not expect resolver to have both a value and an error.') : invariant(false) : void 0;
105
108
  var liveState =
106
109
  // $FlowFixMe[incompatible-type] - casting mixed
107
110
  evaluationResult.resolverResult;
@@ -118,8 +121,6 @@ var LiveResolverCache = /*#__PURE__*/function () {
118
121
  }
119
122
  updatedDataIDs = this._setResolverValue(linkedRecord, evaluationResult.resolverResult, field, variables);
120
123
  }
121
- RelayModernRecord.setValue(linkedRecord, RELAY_RESOLVER_SNAPSHOT_KEY, evaluationResult.snapshot);
122
- RelayModernRecord.setValue(linkedRecord, RELAY_RESOLVER_ERROR_KEY, evaluationResult.error);
123
124
  recordSource.set(linkedID, linkedRecord);
124
125
 
125
126
  // Link the resolver value record to the resolver field of the record being read:
@@ -167,7 +168,7 @@ var LiveResolverCache = /*#__PURE__*/function () {
167
168
  if (!isLiveStateValue(_liveState)) {
168
169
  !false ? process.env.NODE_ENV !== "production" ? invariant(false, 'Unexpected LiveState value returned from Relay Resolver internal field `RELAY_RESOLVER_LIVE_STATE_VALUE`. ' + 'It is likely a bug in Relay, or a corrupt state of the relay store state ' + 'Field Path `%s`. Record `%s`.', field.path, JSON.stringify(linkedRecord)) : invariant(false) : void 0;
169
170
  }
170
- updatedDataIDs = this._setResolverValue(linkedRecord, _liveState.read(), field, variables);
171
+ updatedDataIDs = this._setLiveResolverValue(linkedRecord, _liveState, field, variables);
171
172
 
172
173
  // Mark the resolver as clean again.
173
174
  RelayModernRecord.setValue(linkedRecord, RELAY_RESOLVER_LIVE_STATE_DIRTY, false);
@@ -226,7 +227,7 @@ var LiveResolverCache = /*#__PURE__*/function () {
226
227
  RelayModernRecord.setValue(linkedRecord, RELAY_RESOLVER_LIVE_STATE_VALUE, liveState);
227
228
 
228
229
  // Store the current value, for this read, and future cached reads.
229
- var updatedDataIDs = this._setResolverValue(linkedRecord, liveState.read(), field, variables);
230
+ var updatedDataIDs = this._setLiveResolverValue(linkedRecord, liveState, field, variables);
230
231
 
231
232
  // Mark the field as clean.
232
233
  RelayModernRecord.setValue(linkedRecord, RELAY_RESOLVER_LIVE_STATE_DIRTY, false);
@@ -298,6 +299,17 @@ var LiveResolverCache = /*#__PURE__*/function () {
298
299
  this._handlingBatch = false;
299
300
  }
300
301
  };
302
+ _proto._setLiveResolverValue = function _setLiveResolverValue(resolverRecord, liveValue, field, variables) {
303
+ var value = null;
304
+ var resolverError = null;
305
+ try {
306
+ value = liveValue.read();
307
+ } catch (e) {
308
+ resolverError = e;
309
+ }
310
+ RelayModernRecord.setValue(resolverRecord, RELAY_RESOLVER_ERROR_KEY, resolverError);
311
+ return this._setResolverValue(resolverRecord, value, field, variables);
312
+ };
301
313
  _proto._setResolverValue = function _setResolverValue(resolverRecord, value, field, variables) {
302
314
  var normalizationInfo = field.normalizationInfo;
303
315
  var updatedDataIDs = null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "relay-runtime",
3
3
  "description": "A core runtime for building GraphQL-driven applications.",
4
- "version": "0.0.0-main-feaba45d",
4
+ "version": "0.0.0-main-b23fe58e",
5
5
  "keywords": [
6
6
  "graphql",
7
7
  "relay"
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Relay v0.0.0-main-feaba45d
2
+ * Relay v0.0.0-main-b23fe58e
3
3
  */
4
4
  !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("invariant"),require("@babel/runtime/helpers/interopRequireDefault"),require("fbjs/lib/warning"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/toConsumableArray"),require("fbjs/lib/areEqual"),require("@babel/runtime/helpers/defineProperty")):"function"==typeof define&&define.amd?define(["invariant","@babel/runtime/helpers/interopRequireDefault","fbjs/lib/warning","@babel/runtime/helpers/objectSpread2","@babel/runtime/helpers/toConsumableArray","fbjs/lib/areEqual","@babel/runtime/helpers/defineProperty"],r):"object"==typeof exports?exports.ReactRelayExperimental=r(require("invariant"),require("@babel/runtime/helpers/interopRequireDefault"),require("fbjs/lib/warning"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/toConsumableArray"),require("fbjs/lib/areEqual"),require("@babel/runtime/helpers/defineProperty")):e.ReactRelayExperimental=r(e.invariant,e["@babel/runtime/helpers/interopRequireDefault"],e["fbjs/lib/warning"],e["@babel/runtime/helpers/objectSpread2"],e["@babel/runtime/helpers/toConsumableArray"],e["fbjs/lib/areEqual"],e["@babel/runtime/helpers/defineProperty"])}(window,(function(e,r,t,n,a,o,l){return function(e){var r={};function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)t.d(n,a,function(r){return e[r]}.bind(null,a));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=6)}([function(r,t){r.exports=e},function(e,t){e.exports=r},function(e,r,t){"use strict";e.exports={ACTOR_CHANGE:"ActorChange",CONDITION:"Condition",CLIENT_COMPONENT:"ClientComponent",CLIENT_EDGE_TO_SERVER_OBJECT:"ClientEdgeToServerObject",CLIENT_EDGE_TO_CLIENT_OBJECT:"ClientEdgeToClientObject",CLIENT_EXTENSION:"ClientExtension",DEFER:"Defer",CONNECTION:"Connection",FRAGMENT:"Fragment",FRAGMENT_SPREAD:"FragmentSpread",INLINE_DATA_FRAGMENT_SPREAD:"InlineDataFragmentSpread",INLINE_DATA_FRAGMENT:"InlineDataFragment",INLINE_FRAGMENT:"InlineFragment",LINKED_FIELD:"LinkedField",LINKED_HANDLE:"LinkedHandle",LITERAL:"Literal",LIST_VALUE:"ListValue",LOCAL_ARGUMENT:"LocalArgument",MODULE_IMPORT:"ModuleImport",ALIASED_FRAGMENT_SPREAD:"AliasedFragmentSpread",ALIASED_INLINE_FRAGMENT_SPREAD:"AliasedInlineFragmentSpread",RELAY_RESOLVER:"RelayResolver",RELAY_LIVE_RESOLVER:"RelayLiveResolver",REQUIRED_FIELD:"RequiredField",OBJECT_VALUE:"ObjectValue",OPERATION:"Operation",REQUEST:"Request",ROOT_ARGUMENT:"RootArgument",SCALAR_FIELD:"ScalarField",SCALAR_HANDLE:"ScalarHandle",SPLIT_OPERATION:"SplitOperation",STREAM:"Stream",TYPE_DISCRIMINATOR:"TypeDiscriminator",UPDATABLE_QUERY:"UpdatableQuery",VARIABLE:"Variable"}},function(e,r){e.exports=t},function(e,r){e.exports=n},function(e,r,t){"use strict";var n=(0,t(1).default)(t(12)),a=t(13),o=t(2),l=t(15),i=t(0),u=o.VARIABLE,s=o.LITERAL,f=o.OBJECT_VALUE,c=o.LIST_VALUE;function d(e,r){if(e.kind===u)return function(e,r){return r.hasOwnProperty(e)||i(!1,"getVariableValue(): Undefined variable `%s`.",e),l(r[e])}(e.variableName,r);if(e.kind===s)return e.value;if(e.kind===f){var t={};return e.fields.forEach((function(e){t[e.name]=d(e,r)})),t}if(e.kind===c){var n=[];return e.items.forEach((function(e){null!=e&&n.push(d(e,r))})),n}}function p(e,r){var t={};return e.forEach((function(e){t[e.name]=d(e,r)})),t}function E(e,r){if(!r)return e;var t=[];for(var n in r)if(r.hasOwnProperty(n)){var a,o=r[n];if(null!=o)t.push(n+":"+(null!==(a=JSON.stringify(o))&&void 0!==a?a:"undefined"))}return 0===t.length?e:e+"(".concat(t.join(","),")")}var g={ACTOR_IDENTIFIER_KEY:"__actorIdentifier",CLIENT_EDGE_TRAVERSAL_PATH:"__clientEdgeTraversalPath",FRAGMENTS_KEY:"__fragments",FRAGMENT_OWNER_KEY:"__fragmentOwner",FRAGMENT_PROP_NAME_KEY:"__fragmentPropName",MODULE_COMPONENT_KEY:"__module_component",ID_KEY:"__id",REF_KEY:"__ref",REFS_KEY:"__refs",ROOT_ID:"client:root",ROOT_TYPE:"__Root",TYPENAME_KEY:"__typename",INVALIDATED_AT_KEY:"__invalidated_at",IS_WITHIN_UNMATCHED_TYPE_REFINEMENT:"__isWithinUnmatchedTypeRefinement",RELAY_RESOLVER_VALUE_KEY:"__resolverValue",RELAY_RESOLVER_INVALIDATION_KEY:"__resolverValueMayBeInvalid",RELAY_RESOLVER_SNAPSHOT_KEY:"__resolverSnapshot",RELAY_RESOLVER_ERROR_KEY:"__resolverError",RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS:"__resolverOutputTypeRecordIDs",formatStorageKey:E,getArgumentValue:d,getArgumentValues:p,getHandleStorageKey:function(e,r){var t=e.dynamicKey,o=e.handle,l=e.key,i=e.name,u=e.args,s=e.filters,f=a(o,l,i),c=null;return u&&s&&0!==u.length&&0!==s.length&&(c=u.filter((function(e){return s.indexOf(e.name)>-1}))),t&&(c=null!=c?[t].concat((0,n.default)(c)):[t]),null===c?f:E(f,p(c,r))},getStorageKey:function(e,r){if(e.storageKey)return e.storageKey;var t=function(e){if("RelayResolver"===e.kind||"RelayLiveResolver"===e.kind){var r,t;return null==e.args?null===(t=e.fragment)||void 0===t?void 0:t.args:null==(null===(r=e.fragment)||void 0===r?void 0:r.args)?e.args:e.args.concat(e.fragment.args)}return void 0===e.args?void 0:e.args}(e),n=e.name;return t&&0!==t.length?E(n,p(t,r)):n},getStableStorageKey:function(e,r){return E(e,l(r))},getModuleComponentKey:function(e){return"".concat("__module_component_").concat(e)},getModuleOperationKey:function(e){return"".concat("__module_operation_").concat(e)}};e.exports=g},function(e,r,t){"use strict";var n=t(7),a=t(17),o=a.weakObjectWrapper,l=a.weakObjectWrapperLive;e.exports={resolverDataInjector:n,weakObjectWrapper:o,weakObjectWrapperLive:l}},function(e,r,t){"use strict";var n=t(8).readFragment,a=t(0);e.exports=function(e,r,t,o){var l=r;return function(r,i){var u=n(e,r);if(null==t)return l(u,i);if(null==u){if(!0!==o)return l(null,i);a(!1,"Expected required resolver field `%` to be present. But resolvers fragment data is null/undefined.",t)}if(t in u)return!0===o&&null==u[t]&&a(!1,"Expected required resolver field `%` to be non-null."),l(u[t],i);a(!1,"Missing field `%` in resolver response.",t)}}},function(e,r,t){"use strict";var n=t(9).getFragment,a=t(10).getSelector,o=t(0),l=[];var i={};e.exports={readFragment:function(e,r){if(!l.length)throw new Error("readFragment should be called only from within a Relay Resolver function.");var t=l[l.length-1],u=n(e),s=a(u,r);null==s&&o(!1,"Expected a selector for the fragment of the resolver ".concat(u.name,", but got null.")),"SingularReaderSelector"!==s.kind&&o(!1,"Expected a singular reader selector for the fragment of the resolver ".concat(u.name,", but it was plural."));var f=t.getDataForResolverFragment(s,r),c=f.data;if(f.isMissingData)throw i;return c},withResolverContext:function(e,r){l.push(e);try{return r()}finally{l.pop()}},RESOLVER_FRAGMENT_MISSING_DATA_SENTINEL:i}},function(e,r,t){"use strict";var n=t(2),a=t(0),o=t(3);function l(e){var r=e;return"function"==typeof r?(r=r(),o(!1,"RelayGraphQLTag: node `%s` unexpectedly wrapped in a function.","Fragment"===r.kind?r.name:r.operation.name)):r.default&&(r=r.default),r}function i(e){var r=l(e);return"object"==typeof r&&null!==r&&r.kind===n.FRAGMENT}function u(e){var r=l(e);return"object"==typeof r&&null!==r&&r.kind===n.REQUEST}function s(e){var r=l(e);return"object"==typeof r&&null!==r&&r.kind===n.UPDATABLE_QUERY}function f(e){var r=l(e);return"object"==typeof r&&null!==r&&r.kind===n.INLINE_DATA_FRAGMENT}function c(e){var r=l(e);return i(r)||a(!1,"GraphQLTag: Expected a fragment, got `%s`.",JSON.stringify(r)),r}e.exports={getFragment:c,getNode:l,getPaginationFragment:function(e){var r,t=c(e),n=null===(r=t.metadata)||void 0===r?void 0:r.refetch,a=null==n?void 0:n.connection;return null===n||"object"!=typeof n||null===a||"object"!=typeof a?null:t},getRefetchableFragment:function(e){var r,t=c(e),n=null===(r=t.metadata)||void 0===r?void 0:r.refetch;return null===n||"object"!=typeof n?null:t},getRequest:function(e){var r=l(e);return u(r)||a(!1,"GraphQLTag: Expected a request, got `%s`.",JSON.stringify(r)),r},getUpdatableQuery:function(e){var r=l(e);return s(r)||a(!1,"GraphQLTag: Expected a request, got `%s`.",JSON.stringify(r)),r},getInlineDataFragment:function(e){var r=l(e);return f(r)||a(!1,"GraphQLTag: Expected an inline data fragment, got `%s`.",JSON.stringify(r)),r},graphql:function(e){a(!1,"graphql: Unexpected invocation at runtime. Either the Babel transform was not set up, or it failed to identify this call site. Make sure it is being used verbatim as `graphql`. Note also that there cannot be a space between graphql and the backtick that follows.")},isFragment:i,isRequest:u,isUpdatableQuery:s,isInlineDataFragment:f}},function(e,r,t){"use strict";var n=t(11).getFragmentVariables,a=t(5),o=a.CLIENT_EDGE_TRAVERSAL_PATH,l=a.FRAGMENT_OWNER_KEY,i=a.FRAGMENTS_KEY,u=a.ID_KEY,s=a.IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,f=t(16),c=t(0),d=t(3);function p(e,r){("object"!=typeof r||null===r||Array.isArray(r))&&c(!1,"RelayModernSelector: Expected value for fragment `%s` to be an object, got `%s`.",e.name,JSON.stringify(r));var t=r[u],a=r[i],f=r[l],p=!0===r[s],E=r[o];if("string"==typeof t&&"object"==typeof a&&null!==a&&"object"==typeof a[e.name]&&null!==a[e.name]&&"object"==typeof f&&null!==f&&(null==E||Array.isArray(E))){var g=f,m=E,b=a[e.name];return A(e,t,n(e,g.variables,b),g,p,m)}var _=JSON.stringify(r);return _.length>499&&(_=_.substr(0,498)+"…"),d(!1,"RelayModernSelector: Expected object to contain data for fragment `%s`, got `%s`. Make sure that the parent operation/fragment included fragment `...%s` without `@relay(mask: false)`.",e.name,_,e.name),null}function E(e,r){var t=null;return r.forEach((function(r,n){var a=null!=r?p(e,r):null;null!=a&&(t=t||[]).push(a)})),null==t?null:{kind:"PluralReaderSelector",selectors:t}}function g(e,r){return null==r?r:e.metadata&&!0===e.metadata.plural?(Array.isArray(r)||c(!1,"RelayModernSelector: Expected value for fragment `%s` to be an array, got `%s`. Remove `@relay(plural: true)` from fragment `%s` to allow the prop to be an object.",e.name,JSON.stringify(r),e.name),E(e,r)):(Array.isArray(r)&&c(!1,"RelayModernSelector: Expected value for fragment `%s` to be an object, got `%s`. Add `@relay(plural: true)` to fragment `%s` to allow the prop to be an array of items.",e.name,JSON.stringify(r),e.name),p(e,r))}function m(e,r){return null==r?r:e.metadata&&!0===e.metadata.plural?(Array.isArray(r)||c(!1,"RelayModernSelector: Expected value for fragment `%s` to be an array, got `%s`. Remove `@relay(plural: true)` from fragment `%s` to allow the prop to be an object.",e.name,JSON.stringify(r),e.name),function(e,r){var t=null;return r.forEach((function(r){var n=null!=r?b(e,r):null;null!=n&&(t=t||[]).push(n)})),t}(e,r)):(Array.isArray(r)&&c(!1,"RelayModernFragmentSpecResolver: Expected value for fragment `%s` to be an object, got `%s`. Add `@relay(plural: true)` to fragment `%s` to allow the prop to be an array of items.",e.name,JSON.stringify(r),e.name),b(e,r))}function b(e,r){("object"!=typeof r||null===r||Array.isArray(r))&&c(!1,"RelayModernSelector: Expected value for fragment `%s` to be an object, got `%s`.",e.name,JSON.stringify(r));var t=r[u];return"string"==typeof t?t:(d(!1,"RelayModernSelector: Expected object to contain data for fragment `%s`, got `%s`. Make sure that the parent operation/fragment included fragment `...%s` without `@relay(mask: false)`, or `null` is passed as the fragment reference for `%s` if it's conditonally included and the condition isn't met.",e.name,JSON.stringify(r),e.name,e.name),null)}function _(e,r){var t;return null==r?{}:!0===(null===(t=e.metadata)||void 0===t?void 0:t.plural)?(Array.isArray(r)||c(!1,"RelayModernSelector: Expected value for fragment `%s` to be an array, got `%s`. Remove `@relay(plural: true)` from fragment `%s` to allow the prop to be an object.",e.name,JSON.stringify(r),e.name),y(e,r)):(Array.isArray(r)&&c(!1,"RelayModernFragmentSpecResolver: Expected value for fragment `%s` to be an object, got `%s`. Add `@relay(plural: true)` to fragment `%s` to allow the prop to be an array of items.",e.name,JSON.stringify(r),e.name),v(e,r)||{})}function v(e,r){var t=p(e,r);return t?t.variables:null}function y(e,r){var t={};return r.forEach((function(r,n){if(null!=r){var a=v(e,r);null!=a&&Object.assign(t,a)}})),t}function R(e,r){return e.owner===r.owner&&e.dataID===r.dataID&&e.node===r.node&&f(e.variables,r.variables)}function A(e,r,t,n){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5?arguments[5]:void 0;return{kind:"SingularReaderSelector",dataID:r,isWithinUnmatchedTypeRefinement:a,clientEdgeTraversalPath:null!=o?o:null,node:e,variables:t,owner:n}}e.exports={areEqualSelectors:function(e,r){return e===r||(null==e?null==r:null==r?null==e:"SingularReaderSelector"===e.kind&&"SingularReaderSelector"===r.kind?R(e,r):"PluralReaderSelector"===e.kind&&"PluralReaderSelector"===r.kind&&(e.selectors.length===r.selectors.length&&e.selectors.every((function(e,t){return R(e,r.selectors[t])}))))},createReaderSelector:A,createNormalizationSelector:function(e,r,t){return{dataID:r,node:e,variables:t}},getDataIDsFromFragment:m,getDataIDsFromObject:function(e,r){var t={};for(var n in e)if(e.hasOwnProperty(n)){var a=e[n],o=r[n];t[n]=m(a,o)}return t},getSingularSelector:p,getPluralSelector:E,getSelector:g,getSelectorsFromObject:function(e,r){var t={};for(var n in e)if(e.hasOwnProperty(n)){var a=e[n],o=r[n];t[n]=g(a,o)}return t},getVariablesFromSingularFragment:v,getVariablesFromPluralFragment:y,getVariablesFromFragment:_,getVariablesFromObject:function(e,r){var t={};for(var n in e)if(e.hasOwnProperty(n)){var a=_(e[n],r[n]);Object.assign(t,a)}return t}}},function(e,r,t){"use strict";var n=(0,t(1).default)(t(4)),a=t(5).getArgumentValues,o=t(0);e.exports={getLocalVariables:function(e,r,t){if(null==r)return e;var o=(0,n.default)({},e),l=t?a(t,e):{};return r.forEach((function(e){var r,t=null!==(r=l[e.name])&&void 0!==r?r:e.defaultValue;o[e.name]=t})),o},getFragmentVariables:function(e,r,t){return null==e.argumentDefinitions?t:(e.argumentDefinitions.forEach((function(l){if(!t.hasOwnProperty(l.name))switch(a=a||(0,n.default)({},t),l.kind){case"LocalArgument":a[l.name]=l.defaultValue;break;case"RootArgument":if(!r.hasOwnProperty(l.name)){a[l.name]=void 0;break}a[l.name]=r[l.name];break;default:o(!1,"RelayConcreteVariables: Unexpected node kind `%s` in fragment `%s`.",l.kind,e.name)}})),a||t);var a},getOperationVariables:function(e,r,t){var n={};return e.argumentDefinitions.forEach((function(e){var r=e.defaultValue;null!=t[e.name]&&(r=t[e.name]),n[e.name]=r})),null!=r&&Object.keys(r).forEach((function(e){n[e]=r[e].get()})),n}}},function(e,r){e.exports=a},function(e,r,t){"use strict";var n=t(14).DEFAULT_HANDLE_KEY,a=t(0);e.exports=function(e,r,t){return r&&r!==n?"__".concat(r,"_").concat(e):(null==t&&a(!1,"getRelayHandleKey: Expected either `fieldName` or `key` in `handle` to be provided"),"__".concat(t,"_").concat(e))}},function(e,r,t){"use strict";e.exports={DEFAULT_HANDLE_KEY:""}},function(e,r,t){"use strict";e.exports=function e(r){if(!r||"object"!=typeof r)return r;if(Array.isArray(r))return r.map(e);for(var t=Object.keys(r).sort(),n={},a=0;a<t.length;a++)n[t[a]]=e(r[t[a]]);return n}},function(e,r){e.exports=o},function(e,r,t){"use strict";var n=t(1).default,a=n(t(18)),o=n(t(4)),l=t(19),i=t(20).isSuspenseSentinel,u=t(0);function s(e,r,t){return function(){for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];var s=e.apply(null,o);return null==s||i(s)?s:t?(Array.isArray(s)||u(!1,"Resolver is expected to return a plural value."),s.map((function(e){return(0,a.default)({},r,e)}))):(0,a.default)({},r,s)}}e.exports={weakObjectWrapperLive:function(e,r,t){return function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var f=e.apply(null,a);return l(f)||u(!1,"Resolver is expected to return a LiveState value."),(0,o.default)((0,o.default)({},f),{},{read:s((function(){return f.read()}),r,t)})}},weakObjectWrapper:s}},function(e,r){e.exports=l},function(e,r,t){"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&"function"==typeof e.read&&"function"==typeof e.subscribe}},function(e,r,t){"use strict";var n=Object.freeze({__LIVE_RESOLVER_SUSPENSE_SENTINEL:!0});e.exports={isSuspenseSentinel:function(e){return e===n},suspenseSentinel:function(){return n}}}])}));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-feaba45d
2
+ * Relay v0.0.0-main-b23fe58e
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *