houdini 2.0.0-next.1 → 2.0.0-next.2

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.
@@ -75289,20 +75289,21 @@ var CacheInternal = class {
75289
75289
  } else if (Array.isArray(value) && // make typescript happy
75290
75290
  (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
75291
75291
  let oldIDs = [...previousValue || []];
75292
- const emptyEdges = !updates ? [] : oldIDs.map((id) => {
75293
- if (!id) {
75294
- return "";
75295
- }
75296
- const { value: cursorField } = this.storage.get(id, "cursor");
75297
- if (cursorField) {
75298
- return "";
75299
- }
75300
- const { value: node } = this.storage.get(id, "node");
75301
- if (!node) {
75302
- return "";
75303
- }
75304
- return node;
75305
- });
75292
+ if (updates?.includes("append") || updates?.includes("prepend")) {
75293
+ oldIDs = oldIDs.filter((id) => {
75294
+ for (const layer2 of this.storage.data) {
75295
+ for (const operation of Object.values(layer2.operations)) {
75296
+ if (operation.fields?.[key])
75297
+ for (const listOperation of operation.fields[key]) {
75298
+ if ("id" in listOperation && listOperation.id === id) {
75299
+ return false;
75300
+ }
75301
+ }
75302
+ }
75303
+ }
75304
+ return true;
75305
+ });
75306
+ }
75306
75307
  let linkedIDs = [];
75307
75308
  const { newIDs, nestedIDs } = this.extractNestedListIDs({
75308
75309
  value,
@@ -75321,39 +75322,45 @@ var CacheInternal = class {
75321
75322
  layer.writeLink(parent, key, linkedIDs);
75322
75323
  };
75323
75324
  if (applyUpdates && updates) {
75324
- if (key === "edges") {
75325
- const newNodeIDs = [];
75326
- for (const id of newIDs) {
75325
+ const filterIDs = (keep, insert) => {
75326
+ const existingIDs = /* @__PURE__ */ new Set();
75327
+ for (const id of keep) {
75327
75328
  if (!id) {
75328
75329
  continue;
75329
75330
  }
75330
75331
  const { value: node } = this.storage.get(id, "node");
75331
- if (typeof node !== "string") {
75332
+ if (!node) {
75332
75333
  continue;
75333
75334
  }
75334
- if (!node || !this.storage.get(node, "__typename")) {
75335
+ const nodeID = this.storage.get(node, "id");
75336
+ if (!nodeID) {
75335
75337
  continue;
75336
75338
  }
75337
- newNodeIDs.push(node);
75339
+ existingIDs.add(nodeID.value);
75338
75340
  }
75339
- oldIDs = oldIDs.filter((id) => {
75341
+ return insert.filter((id) => {
75340
75342
  if (!id) {
75341
75343
  return true;
75342
75344
  }
75343
- const { value: value2 } = this.storage.get(id, "node");
75344
- const node = value2;
75345
- if (newNodeIDs.includes(node) && emptyEdges.includes(node)) {
75346
- return false;
75345
+ const { value: node } = this.storage.get(id, "node");
75346
+ if (!node) {
75347
+ return true;
75347
75348
  }
75348
- return true;
75349
+ const nodeID = this.storage.get(node, "id");
75350
+ if (!nodeID) {
75351
+ return true;
75352
+ }
75353
+ return !existingIDs.has(nodeID.value);
75349
75354
  });
75350
- }
75355
+ };
75351
75356
  for (const update of applyUpdates) {
75352
75357
  if (update !== "replace" && !updates.includes(update)) {
75353
75358
  continue;
75354
75359
  }
75355
75360
  if (update === "prepend") {
75356
- linkedIDs = newIDs.concat(oldIDs);
75361
+ linkedIDs = newIDs.concat(
75362
+ filterIDs(newIDs, oldIDs)
75363
+ );
75357
75364
  if (layer?.optimistic) {
75358
75365
  action = () => {
75359
75366
  for (const id of newIDs) {
@@ -75364,7 +75371,7 @@ var CacheInternal = class {
75364
75371
  };
75365
75372
  }
75366
75373
  } else if (update === "append") {
75367
- linkedIDs = oldIDs.concat(newIDs);
75374
+ linkedIDs = filterIDs(newIDs, oldIDs).concat(newIDs);
75368
75375
  if (layer?.optimistic) {
75369
75376
  action = () => {
75370
75377
  for (const id of newIDs) {
@@ -414,20 +414,21 @@ class CacheInternal {
414
414
  } else if (Array.isArray(value) && // make typescript happy
415
415
  (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
416
416
  let oldIDs = [...previousValue || []];
417
- const emptyEdges = !updates ? [] : oldIDs.map((id) => {
418
- if (!id) {
419
- return "";
420
- }
421
- const { value: cursorField } = this.storage.get(id, "cursor");
422
- if (cursorField) {
423
- return "";
424
- }
425
- const { value: node } = this.storage.get(id, "node");
426
- if (!node) {
427
- return "";
428
- }
429
- return node;
430
- });
417
+ if (updates?.includes("append") || updates?.includes("prepend")) {
418
+ oldIDs = oldIDs.filter((id) => {
419
+ for (const layer2 of this.storage.data) {
420
+ for (const operation of Object.values(layer2.operations)) {
421
+ if (operation.fields?.[key])
422
+ for (const listOperation of operation.fields[key]) {
423
+ if ("id" in listOperation && listOperation.id === id) {
424
+ return false;
425
+ }
426
+ }
427
+ }
428
+ }
429
+ return true;
430
+ });
431
+ }
431
432
  let linkedIDs = [];
432
433
  const { newIDs, nestedIDs } = this.extractNestedListIDs({
433
434
  value,
@@ -446,39 +447,45 @@ class CacheInternal {
446
447
  layer.writeLink(parent, key, linkedIDs);
447
448
  };
448
449
  if (applyUpdates && updates) {
449
- if (key === "edges") {
450
- const newNodeIDs = [];
451
- for (const id of newIDs) {
450
+ const filterIDs = (keep, insert) => {
451
+ const existingIDs = /* @__PURE__ */ new Set();
452
+ for (const id of keep) {
452
453
  if (!id) {
453
454
  continue;
454
455
  }
455
456
  const { value: node } = this.storage.get(id, "node");
456
- if (typeof node !== "string") {
457
+ if (!node) {
457
458
  continue;
458
459
  }
459
- if (!node || !this.storage.get(node, "__typename")) {
460
+ const nodeID = this.storage.get(node, "id");
461
+ if (!nodeID) {
460
462
  continue;
461
463
  }
462
- newNodeIDs.push(node);
464
+ existingIDs.add(nodeID.value);
463
465
  }
464
- oldIDs = oldIDs.filter((id) => {
466
+ return insert.filter((id) => {
465
467
  if (!id) {
466
468
  return true;
467
469
  }
468
- const { value: value2 } = this.storage.get(id, "node");
469
- const node = value2;
470
- if (newNodeIDs.includes(node) && emptyEdges.includes(node)) {
471
- return false;
470
+ const { value: node } = this.storage.get(id, "node");
471
+ if (!node) {
472
+ return true;
473
+ }
474
+ const nodeID = this.storage.get(node, "id");
475
+ if (!nodeID) {
476
+ return true;
472
477
  }
473
- return true;
478
+ return !existingIDs.has(nodeID.value);
474
479
  });
475
- }
480
+ };
476
481
  for (const update of applyUpdates) {
477
482
  if (update !== "replace" && !updates.includes(update)) {
478
483
  continue;
479
484
  }
480
485
  if (update === "prepend") {
481
- linkedIDs = newIDs.concat(oldIDs);
486
+ linkedIDs = newIDs.concat(
487
+ filterIDs(newIDs, oldIDs)
488
+ );
482
489
  if (layer?.optimistic) {
483
490
  action = () => {
484
491
  for (const id of newIDs) {
@@ -489,7 +496,7 @@ class CacheInternal {
489
496
  };
490
497
  }
491
498
  } else if (update === "append") {
492
- linkedIDs = oldIDs.concat(newIDs);
499
+ linkedIDs = filterIDs(newIDs, oldIDs).concat(newIDs);
493
500
  if (layer?.optimistic) {
494
501
  action = () => {
495
502
  for (const id of newIDs) {
@@ -387,20 +387,21 @@ class CacheInternal {
387
387
  } else if (Array.isArray(value) && // make typescript happy
388
388
  (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
389
389
  let oldIDs = [...previousValue || []];
390
- const emptyEdges = !updates ? [] : oldIDs.map((id) => {
391
- if (!id) {
392
- return "";
393
- }
394
- const { value: cursorField } = this.storage.get(id, "cursor");
395
- if (cursorField) {
396
- return "";
397
- }
398
- const { value: node } = this.storage.get(id, "node");
399
- if (!node) {
400
- return "";
401
- }
402
- return node;
403
- });
390
+ if (updates?.includes("append") || updates?.includes("prepend")) {
391
+ oldIDs = oldIDs.filter((id) => {
392
+ for (const layer2 of this.storage.data) {
393
+ for (const operation of Object.values(layer2.operations)) {
394
+ if (operation.fields?.[key])
395
+ for (const listOperation of operation.fields[key]) {
396
+ if ("id" in listOperation && listOperation.id === id) {
397
+ return false;
398
+ }
399
+ }
400
+ }
401
+ }
402
+ return true;
403
+ });
404
+ }
404
405
  let linkedIDs = [];
405
406
  const { newIDs, nestedIDs } = this.extractNestedListIDs({
406
407
  value,
@@ -419,39 +420,45 @@ class CacheInternal {
419
420
  layer.writeLink(parent, key, linkedIDs);
420
421
  };
421
422
  if (applyUpdates && updates) {
422
- if (key === "edges") {
423
- const newNodeIDs = [];
424
- for (const id of newIDs) {
423
+ const filterIDs = (keep, insert) => {
424
+ const existingIDs = /* @__PURE__ */ new Set();
425
+ for (const id of keep) {
425
426
  if (!id) {
426
427
  continue;
427
428
  }
428
429
  const { value: node } = this.storage.get(id, "node");
429
- if (typeof node !== "string") {
430
+ if (!node) {
430
431
  continue;
431
432
  }
432
- if (!node || !this.storage.get(node, "__typename")) {
433
+ const nodeID = this.storage.get(node, "id");
434
+ if (!nodeID) {
433
435
  continue;
434
436
  }
435
- newNodeIDs.push(node);
437
+ existingIDs.add(nodeID.value);
436
438
  }
437
- oldIDs = oldIDs.filter((id) => {
439
+ return insert.filter((id) => {
438
440
  if (!id) {
439
441
  return true;
440
442
  }
441
- const { value: value2 } = this.storage.get(id, "node");
442
- const node = value2;
443
- if (newNodeIDs.includes(node) && emptyEdges.includes(node)) {
444
- return false;
443
+ const { value: node } = this.storage.get(id, "node");
444
+ if (!node) {
445
+ return true;
446
+ }
447
+ const nodeID = this.storage.get(node, "id");
448
+ if (!nodeID) {
449
+ return true;
445
450
  }
446
- return true;
451
+ return !existingIDs.has(nodeID.value);
447
452
  });
448
- }
453
+ };
449
454
  for (const update of applyUpdates) {
450
455
  if (update !== "replace" && !updates.includes(update)) {
451
456
  continue;
452
457
  }
453
458
  if (update === "prepend") {
454
- linkedIDs = newIDs.concat(oldIDs);
459
+ linkedIDs = newIDs.concat(
460
+ filterIDs(newIDs, oldIDs)
461
+ );
455
462
  if (layer?.optimistic) {
456
463
  action = () => {
457
464
  for (const id of newIDs) {
@@ -462,7 +469,7 @@ class CacheInternal {
462
469
  };
463
470
  }
464
471
  } else if (update === "append") {
465
- linkedIDs = oldIDs.concat(newIDs);
472
+ linkedIDs = filterIDs(newIDs, oldIDs).concat(newIDs);
466
473
  if (layer?.optimistic) {
467
474
  action = () => {
468
475
  for (const id of newIDs) {
@@ -64950,20 +64950,21 @@ var CacheInternal = class {
64950
64950
  } else if (Array.isArray(value) && // make typescript happy
64951
64951
  (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
64952
64952
  let oldIDs = [...previousValue || []];
64953
- const emptyEdges = !updates ? [] : oldIDs.map((id) => {
64954
- if (!id) {
64955
- return "";
64956
- }
64957
- const { value: cursorField } = this.storage.get(id, "cursor");
64958
- if (cursorField) {
64959
- return "";
64960
- }
64961
- const { value: node } = this.storage.get(id, "node");
64962
- if (!node) {
64963
- return "";
64964
- }
64965
- return node;
64966
- });
64953
+ if (updates?.includes("append") || updates?.includes("prepend")) {
64954
+ oldIDs = oldIDs.filter((id) => {
64955
+ for (const layer2 of this.storage.data) {
64956
+ for (const operation of Object.values(layer2.operations)) {
64957
+ if (operation.fields?.[key])
64958
+ for (const listOperation of operation.fields[key]) {
64959
+ if ("id" in listOperation && listOperation.id === id) {
64960
+ return false;
64961
+ }
64962
+ }
64963
+ }
64964
+ }
64965
+ return true;
64966
+ });
64967
+ }
64967
64968
  let linkedIDs = [];
64968
64969
  const { newIDs, nestedIDs } = this.extractNestedListIDs({
64969
64970
  value,
@@ -64982,39 +64983,45 @@ var CacheInternal = class {
64982
64983
  layer.writeLink(parent2, key, linkedIDs);
64983
64984
  };
64984
64985
  if (applyUpdates && updates) {
64985
- if (key === "edges") {
64986
- const newNodeIDs = [];
64987
- for (const id of newIDs) {
64986
+ const filterIDs = (keep, insert) => {
64987
+ const existingIDs = /* @__PURE__ */ new Set();
64988
+ for (const id of keep) {
64988
64989
  if (!id) {
64989
64990
  continue;
64990
64991
  }
64991
64992
  const { value: node } = this.storage.get(id, "node");
64992
- if (typeof node !== "string") {
64993
+ if (!node) {
64993
64994
  continue;
64994
64995
  }
64995
- if (!node || !this.storage.get(node, "__typename")) {
64996
+ const nodeID = this.storage.get(node, "id");
64997
+ if (!nodeID) {
64996
64998
  continue;
64997
64999
  }
64998
- newNodeIDs.push(node);
65000
+ existingIDs.add(nodeID.value);
64999
65001
  }
65000
- oldIDs = oldIDs.filter((id) => {
65002
+ return insert.filter((id) => {
65001
65003
  if (!id) {
65002
65004
  return true;
65003
65005
  }
65004
- const { value: value2 } = this.storage.get(id, "node");
65005
- const node = value2;
65006
- if (newNodeIDs.includes(node) && emptyEdges.includes(node)) {
65007
- return false;
65006
+ const { value: node } = this.storage.get(id, "node");
65007
+ if (!node) {
65008
+ return true;
65008
65009
  }
65009
- return true;
65010
+ const nodeID = this.storage.get(node, "id");
65011
+ if (!nodeID) {
65012
+ return true;
65013
+ }
65014
+ return !existingIDs.has(nodeID.value);
65010
65015
  });
65011
- }
65016
+ };
65012
65017
  for (const update of applyUpdates) {
65013
65018
  if (update !== "replace" && !updates.includes(update)) {
65014
65019
  continue;
65015
65020
  }
65016
65021
  if (update === "prepend") {
65017
- linkedIDs = newIDs.concat(oldIDs);
65022
+ linkedIDs = newIDs.concat(
65023
+ filterIDs(newIDs, oldIDs)
65024
+ );
65018
65025
  if (layer?.optimistic) {
65019
65026
  action = () => {
65020
65027
  for (const id of newIDs) {
@@ -65025,7 +65032,7 @@ var CacheInternal = class {
65025
65032
  };
65026
65033
  }
65027
65034
  } else if (update === "append") {
65028
- linkedIDs = oldIDs.concat(newIDs);
65035
+ linkedIDs = filterIDs(newIDs, oldIDs).concat(newIDs);
65029
65036
  if (layer?.optimistic) {
65030
65037
  action = () => {
65031
65038
  for (const id of newIDs) {
@@ -64947,20 +64947,21 @@ var CacheInternal = class {
64947
64947
  } else if (Array.isArray(value) && // make typescript happy
64948
64948
  (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
64949
64949
  let oldIDs = [...previousValue || []];
64950
- const emptyEdges = !updates ? [] : oldIDs.map((id) => {
64951
- if (!id) {
64952
- return "";
64953
- }
64954
- const { value: cursorField } = this.storage.get(id, "cursor");
64955
- if (cursorField) {
64956
- return "";
64957
- }
64958
- const { value: node } = this.storage.get(id, "node");
64959
- if (!node) {
64960
- return "";
64961
- }
64962
- return node;
64963
- });
64950
+ if (updates?.includes("append") || updates?.includes("prepend")) {
64951
+ oldIDs = oldIDs.filter((id) => {
64952
+ for (const layer2 of this.storage.data) {
64953
+ for (const operation of Object.values(layer2.operations)) {
64954
+ if (operation.fields?.[key])
64955
+ for (const listOperation of operation.fields[key]) {
64956
+ if ("id" in listOperation && listOperation.id === id) {
64957
+ return false;
64958
+ }
64959
+ }
64960
+ }
64961
+ }
64962
+ return true;
64963
+ });
64964
+ }
64964
64965
  let linkedIDs = [];
64965
64966
  const { newIDs, nestedIDs } = this.extractNestedListIDs({
64966
64967
  value,
@@ -64979,39 +64980,45 @@ var CacheInternal = class {
64979
64980
  layer.writeLink(parent2, key, linkedIDs);
64980
64981
  };
64981
64982
  if (applyUpdates && updates) {
64982
- if (key === "edges") {
64983
- const newNodeIDs = [];
64984
- for (const id of newIDs) {
64983
+ const filterIDs = (keep, insert) => {
64984
+ const existingIDs = /* @__PURE__ */ new Set();
64985
+ for (const id of keep) {
64985
64986
  if (!id) {
64986
64987
  continue;
64987
64988
  }
64988
64989
  const { value: node } = this.storage.get(id, "node");
64989
- if (typeof node !== "string") {
64990
+ if (!node) {
64990
64991
  continue;
64991
64992
  }
64992
- if (!node || !this.storage.get(node, "__typename")) {
64993
+ const nodeID = this.storage.get(node, "id");
64994
+ if (!nodeID) {
64993
64995
  continue;
64994
64996
  }
64995
- newNodeIDs.push(node);
64997
+ existingIDs.add(nodeID.value);
64996
64998
  }
64997
- oldIDs = oldIDs.filter((id) => {
64999
+ return insert.filter((id) => {
64998
65000
  if (!id) {
64999
65001
  return true;
65000
65002
  }
65001
- const { value: value2 } = this.storage.get(id, "node");
65002
- const node = value2;
65003
- if (newNodeIDs.includes(node) && emptyEdges.includes(node)) {
65004
- return false;
65003
+ const { value: node } = this.storage.get(id, "node");
65004
+ if (!node) {
65005
+ return true;
65005
65006
  }
65006
- return true;
65007
+ const nodeID = this.storage.get(node, "id");
65008
+ if (!nodeID) {
65009
+ return true;
65010
+ }
65011
+ return !existingIDs.has(nodeID.value);
65007
65012
  });
65008
- }
65013
+ };
65009
65014
  for (const update of applyUpdates) {
65010
65015
  if (update !== "replace" && !updates.includes(update)) {
65011
65016
  continue;
65012
65017
  }
65013
65018
  if (update === "prepend") {
65014
- linkedIDs = newIDs.concat(oldIDs);
65019
+ linkedIDs = newIDs.concat(
65020
+ filterIDs(newIDs, oldIDs)
65021
+ );
65015
65022
  if (layer?.optimistic) {
65016
65023
  action = () => {
65017
65024
  for (const id of newIDs) {
@@ -65022,7 +65029,7 @@ var CacheInternal = class {
65022
65029
  };
65023
65030
  }
65024
65031
  } else if (update === "append") {
65025
- linkedIDs = oldIDs.concat(newIDs);
65032
+ linkedIDs = filterIDs(newIDs, oldIDs).concat(newIDs);
65026
65033
  if (layer?.optimistic) {
65027
65034
  action = () => {
65028
65035
  for (const id of newIDs) {
@@ -74997,20 +74997,21 @@ var CacheInternal = class {
74997
74997
  } else if (Array.isArray(value) && // make typescript happy
74998
74998
  (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
74999
74999
  let oldIDs = [...previousValue || []];
75000
- const emptyEdges = !updates ? [] : oldIDs.map((id) => {
75001
- if (!id) {
75002
- return "";
75003
- }
75004
- const { value: cursorField } = this.storage.get(id, "cursor");
75005
- if (cursorField) {
75006
- return "";
75007
- }
75008
- const { value: node } = this.storage.get(id, "node");
75009
- if (!node) {
75010
- return "";
75011
- }
75012
- return node;
75013
- });
75000
+ if (updates?.includes("append") || updates?.includes("prepend")) {
75001
+ oldIDs = oldIDs.filter((id) => {
75002
+ for (const layer2 of this.storage.data) {
75003
+ for (const operation of Object.values(layer2.operations)) {
75004
+ if (operation.fields?.[key])
75005
+ for (const listOperation of operation.fields[key]) {
75006
+ if ("id" in listOperation && listOperation.id === id) {
75007
+ return false;
75008
+ }
75009
+ }
75010
+ }
75011
+ }
75012
+ return true;
75013
+ });
75014
+ }
75014
75015
  let linkedIDs = [];
75015
75016
  const { newIDs, nestedIDs } = this.extractNestedListIDs({
75016
75017
  value,
@@ -75029,39 +75030,45 @@ var CacheInternal = class {
75029
75030
  layer.writeLink(parent2, key, linkedIDs);
75030
75031
  };
75031
75032
  if (applyUpdates && updates) {
75032
- if (key === "edges") {
75033
- const newNodeIDs = [];
75034
- for (const id of newIDs) {
75033
+ const filterIDs = (keep, insert) => {
75034
+ const existingIDs = /* @__PURE__ */ new Set();
75035
+ for (const id of keep) {
75035
75036
  if (!id) {
75036
75037
  continue;
75037
75038
  }
75038
75039
  const { value: node } = this.storage.get(id, "node");
75039
- if (typeof node !== "string") {
75040
+ if (!node) {
75040
75041
  continue;
75041
75042
  }
75042
- if (!node || !this.storage.get(node, "__typename")) {
75043
+ const nodeID = this.storage.get(node, "id");
75044
+ if (!nodeID) {
75043
75045
  continue;
75044
75046
  }
75045
- newNodeIDs.push(node);
75047
+ existingIDs.add(nodeID.value);
75046
75048
  }
75047
- oldIDs = oldIDs.filter((id) => {
75049
+ return insert.filter((id) => {
75048
75050
  if (!id) {
75049
75051
  return true;
75050
75052
  }
75051
- const { value: value2 } = this.storage.get(id, "node");
75052
- const node = value2;
75053
- if (newNodeIDs.includes(node) && emptyEdges.includes(node)) {
75054
- return false;
75053
+ const { value: node } = this.storage.get(id, "node");
75054
+ if (!node) {
75055
+ return true;
75055
75056
  }
75056
- return true;
75057
+ const nodeID = this.storage.get(node, "id");
75058
+ if (!nodeID) {
75059
+ return true;
75060
+ }
75061
+ return !existingIDs.has(nodeID.value);
75057
75062
  });
75058
- }
75063
+ };
75059
75064
  for (const update of applyUpdates) {
75060
75065
  if (update !== "replace" && !updates.includes(update)) {
75061
75066
  continue;
75062
75067
  }
75063
75068
  if (update === "prepend") {
75064
- linkedIDs = newIDs.concat(oldIDs);
75069
+ linkedIDs = newIDs.concat(
75070
+ filterIDs(newIDs, oldIDs)
75071
+ );
75065
75072
  if (layer?.optimistic) {
75066
75073
  action = () => {
75067
75074
  for (const id of newIDs) {
@@ -75072,7 +75079,7 @@ var CacheInternal = class {
75072
75079
  };
75073
75080
  }
75074
75081
  } else if (update === "append") {
75075
- linkedIDs = oldIDs.concat(newIDs);
75082
+ linkedIDs = filterIDs(newIDs, oldIDs).concat(newIDs);
75076
75083
  if (layer?.optimistic) {
75077
75084
  action = () => {
75078
75085
  for (const id of newIDs) {