relay-runtime 0.0.0-main-9ee9d8d0 → 0.0.0-main-6e8b52f6

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-9ee9d8d0
2
+ * Relay v0.0.0-main-6e8b52f6
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
@@ -284,6 +284,10 @@ function getVariablesFromPluralFragment(fragment, items) {
284
284
  });
285
285
  return variables;
286
286
  }
287
+
288
+ function areEqualSingularSelectors(thisSelector, thatSelector) {
289
+ return thisSelector.owner === thatSelector.owner && thisSelector.dataID === thatSelector.dataID && thisSelector.node === thatSelector.node && areEqual(thisSelector.variables, thatSelector.variables);
290
+ }
287
291
  /**
288
292
  * @public
289
293
  *
@@ -293,8 +297,18 @@ function getVariablesFromPluralFragment(fragment, items) {
293
297
  */
294
298
 
295
299
 
296
- function areEqualSelectors(thisSelector, thatSelector) {
297
- return thisSelector.owner === thatSelector.owner && thisSelector.dataID === thatSelector.dataID && thisSelector.node === thatSelector.node && areEqual(thisSelector.variables, thatSelector.variables);
300
+ function areEqualSelectors(a, b) {
301
+ if ((a === null || a === void 0 ? void 0 : a.kind) === 'SingularReaderSelector' && (b === null || b === void 0 ? void 0 : b.kind) === 'SingularReaderSelector') {
302
+ return areEqualSingularSelectors(a, b);
303
+ } else if ((a === null || a === void 0 ? void 0 : a.kind) === 'PluralReaderSelector' && (b === null || b === void 0 ? void 0 : b.kind) === 'PluralReaderSelector') {
304
+ return a.selectors.length === b.selectors.length && a.selectors.every(function (s, i) {
305
+ return areEqualSingularSelectors(s, b.selectors[i]);
306
+ });
307
+ } else if (a == null && b == null) {
308
+ return true;
309
+ } else {
310
+ return false;
311
+ }
298
312
  }
299
313
 
300
314
  function createReaderSelector(fragment, dataID, variables, request) {
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-9ee9d8d0",
4
+ "version": "0.0.0-main-6e8b52f6",
5
5
  "keywords": [
6
6
  "graphql",
7
7
  "relay"