houdini-svelte 1.2.37 → 1.2.39
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/build/plugin-cjs/index.js +4 -10
- package/build/plugin-esm/index.js +4 -10
- package/build/preprocess-cjs/index.js +6 -11
- package/build/preprocess-esm/index.js +6 -11
- package/build/runtime-cjs/stores/query.js +2 -1
- package/build/runtime-esm/stores/query.js +2 -1
- package/build/test-cjs/index.js +13 -22
- package/build/test-esm/index.js +13 -22
- package/package.json +3 -2
|
@@ -77361,10 +77361,7 @@ var CacheInternal = class {
|
|
|
77361
77361
|
});
|
|
77362
77362
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
77363
77363
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
77364
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
77365
|
-
if (typeof target !== "string") {
|
|
77366
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
77367
|
-
}
|
|
77364
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
77368
77365
|
const targetID = this.id(operation.type, target);
|
|
77369
77366
|
if (!targetID) {
|
|
77370
77367
|
continue;
|
|
@@ -77564,7 +77561,7 @@ var CacheInternal = class {
|
|
|
77564
77561
|
};
|
|
77565
77562
|
}
|
|
77566
77563
|
id(type, data2) {
|
|
77567
|
-
const id2 = typeof data2 === "
|
|
77564
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
77568
77565
|
if (!id2) {
|
|
77569
77566
|
return null;
|
|
77570
77567
|
}
|
|
@@ -142500,10 +142497,7 @@ var CacheInternal2 = class {
|
|
|
142500
142497
|
});
|
|
142501
142498
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
142502
142499
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
142503
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
142504
|
-
if (typeof target !== "string") {
|
|
142505
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
142506
|
-
}
|
|
142500
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
142507
142501
|
const targetID = this.id(operation.type, target);
|
|
142508
142502
|
if (!targetID) {
|
|
142509
142503
|
continue;
|
|
@@ -142703,7 +142697,7 @@ var CacheInternal2 = class {
|
|
|
142703
142697
|
};
|
|
142704
142698
|
}
|
|
142705
142699
|
id(type, data2) {
|
|
142706
|
-
const id2 = typeof data2 === "
|
|
142700
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
142707
142701
|
if (!id2) {
|
|
142708
142702
|
return null;
|
|
142709
142703
|
}
|
|
@@ -77356,10 +77356,7 @@ var CacheInternal = class {
|
|
|
77356
77356
|
});
|
|
77357
77357
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
77358
77358
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
77359
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
77360
|
-
if (typeof target !== "string") {
|
|
77361
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
77362
|
-
}
|
|
77359
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
77363
77360
|
const targetID = this.id(operation.type, target);
|
|
77364
77361
|
if (!targetID) {
|
|
77365
77362
|
continue;
|
|
@@ -77559,7 +77556,7 @@ var CacheInternal = class {
|
|
|
77559
77556
|
};
|
|
77560
77557
|
}
|
|
77561
77558
|
id(type, data2) {
|
|
77562
|
-
const id2 = typeof data2 === "
|
|
77559
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
77563
77560
|
if (!id2) {
|
|
77564
77561
|
return null;
|
|
77565
77562
|
}
|
|
@@ -142494,10 +142491,7 @@ var CacheInternal2 = class {
|
|
|
142494
142491
|
});
|
|
142495
142492
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
142496
142493
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
142497
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
142498
|
-
if (typeof target !== "string") {
|
|
142499
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
142500
|
-
}
|
|
142494
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
142501
142495
|
const targetID = this.id(operation.type, target);
|
|
142502
142496
|
if (!targetID) {
|
|
142503
142497
|
continue;
|
|
@@ -142697,7 +142691,7 @@ var CacheInternal2 = class {
|
|
|
142697
142691
|
};
|
|
142698
142692
|
}
|
|
142699
142693
|
id(type, data2) {
|
|
142700
|
-
const id2 = typeof data2 === "
|
|
142694
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
142701
142695
|
if (!id2) {
|
|
142702
142696
|
return null;
|
|
142703
142697
|
}
|
|
@@ -77343,7 +77343,8 @@ var CachePolicy = {
|
|
|
77343
77343
|
CacheOrNetwork: "CacheOrNetwork",
|
|
77344
77344
|
CacheOnly: "CacheOnly",
|
|
77345
77345
|
NetworkOnly: "NetworkOnly",
|
|
77346
|
-
CacheAndNetwork: "CacheAndNetwork"
|
|
77346
|
+
CacheAndNetwork: "CacheAndNetwork",
|
|
77347
|
+
NoCache: "NoCache"
|
|
77347
77348
|
};
|
|
77348
77349
|
var PaginateMode = {
|
|
77349
77350
|
Infinite: "Infinite",
|
|
@@ -80695,10 +80696,7 @@ var CacheInternal = class {
|
|
|
80695
80696
|
});
|
|
80696
80697
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
80697
80698
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
80698
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
80699
|
-
if (typeof target !== "string") {
|
|
80700
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
80701
|
-
}
|
|
80699
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
80702
80700
|
const targetID = this.id(operation.type, target);
|
|
80703
80701
|
if (!targetID) {
|
|
80704
80702
|
continue;
|
|
@@ -80898,7 +80896,7 @@ var CacheInternal = class {
|
|
|
80898
80896
|
};
|
|
80899
80897
|
}
|
|
80900
80898
|
id(type, data2) {
|
|
80901
|
-
const id2 = typeof data2 === "
|
|
80899
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
80902
80900
|
if (!id2) {
|
|
80903
80901
|
return null;
|
|
80904
80902
|
}
|
|
@@ -174305,10 +174303,7 @@ var CacheInternal2 = class {
|
|
|
174305
174303
|
});
|
|
174306
174304
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
174307
174305
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
174308
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
174309
|
-
if (typeof target !== "string") {
|
|
174310
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
174311
|
-
}
|
|
174306
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
174312
174307
|
const targetID = this.id(operation.type, target);
|
|
174313
174308
|
if (!targetID) {
|
|
174314
174309
|
continue;
|
|
@@ -174508,7 +174503,7 @@ var CacheInternal2 = class {
|
|
|
174508
174503
|
};
|
|
174509
174504
|
}
|
|
174510
174505
|
id(type, data2) {
|
|
174511
|
-
const id2 = typeof data2 === "
|
|
174506
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
174512
174507
|
if (!id2) {
|
|
174513
174508
|
return null;
|
|
174514
174509
|
}
|
|
@@ -77340,7 +77340,8 @@ var CachePolicy = {
|
|
|
77340
77340
|
CacheOrNetwork: "CacheOrNetwork",
|
|
77341
77341
|
CacheOnly: "CacheOnly",
|
|
77342
77342
|
NetworkOnly: "NetworkOnly",
|
|
77343
|
-
CacheAndNetwork: "CacheAndNetwork"
|
|
77343
|
+
CacheAndNetwork: "CacheAndNetwork",
|
|
77344
|
+
NoCache: "NoCache"
|
|
77344
77345
|
};
|
|
77345
77346
|
var PaginateMode = {
|
|
77346
77347
|
Infinite: "Infinite",
|
|
@@ -80692,10 +80693,7 @@ var CacheInternal = class {
|
|
|
80692
80693
|
});
|
|
80693
80694
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
80694
80695
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
80695
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
80696
|
-
if (typeof target !== "string") {
|
|
80697
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
80698
|
-
}
|
|
80696
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
80699
80697
|
const targetID = this.id(operation.type, target);
|
|
80700
80698
|
if (!targetID) {
|
|
80701
80699
|
continue;
|
|
@@ -80895,7 +80893,7 @@ var CacheInternal = class {
|
|
|
80895
80893
|
};
|
|
80896
80894
|
}
|
|
80897
80895
|
id(type, data2) {
|
|
80898
|
-
const id2 = typeof data2 === "
|
|
80896
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
80899
80897
|
if (!id2) {
|
|
80900
80898
|
return null;
|
|
80901
80899
|
}
|
|
@@ -174301,10 +174299,7 @@ var CacheInternal2 = class {
|
|
|
174301
174299
|
});
|
|
174302
174300
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
174303
174301
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
174304
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
174305
|
-
if (typeof target !== "string") {
|
|
174306
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
174307
|
-
}
|
|
174302
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
174308
174303
|
const targetID = this.id(operation.type, target);
|
|
174309
174304
|
if (!targetID) {
|
|
174310
174305
|
continue;
|
|
@@ -174504,7 +174499,7 @@ var CacheInternal2 = class {
|
|
|
174504
174499
|
};
|
|
174505
174500
|
}
|
|
174506
174501
|
id(type, data2) {
|
|
174507
|
-
const id2 = typeof data2 === "
|
|
174502
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
174508
174503
|
if (!id2) {
|
|
174509
174504
|
return null;
|
|
174510
174505
|
}
|
|
@@ -107,7 +107,8 @@ This will result in duplicate queries. If you are trying to ensure there is alwa
|
|
|
107
107
|
...this.artifact.input?.defaults,
|
|
108
108
|
...params.variables
|
|
109
109
|
};
|
|
110
|
-
|
|
110
|
+
const refersToCache = policy !== import_types.CachePolicy.NetworkOnly && policy !== import_types.CachePolicy.NoCache;
|
|
111
|
+
if (refersToCache && fakeAwait) {
|
|
111
112
|
await this.observer.send({
|
|
112
113
|
fetch: context.fetch,
|
|
113
114
|
variables: usedVariables,
|
|
@@ -77,7 +77,8 @@ This will result in duplicate queries. If you are trying to ensure there is alwa
|
|
|
77
77
|
...this.artifact.input?.defaults,
|
|
78
78
|
...params.variables
|
|
79
79
|
};
|
|
80
|
-
|
|
80
|
+
const refersToCache = policy !== CachePolicy.NetworkOnly && policy !== CachePolicy.NoCache;
|
|
81
|
+
if (refersToCache && fakeAwait) {
|
|
81
82
|
await this.observer.send({
|
|
82
83
|
fetch: context.fetch,
|
|
83
84
|
variables: usedVariables,
|
package/build/test-cjs/index.js
CHANGED
|
@@ -77364,10 +77364,7 @@ var CacheInternal = class {
|
|
|
77364
77364
|
});
|
|
77365
77365
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
77366
77366
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
77367
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
77368
|
-
if (typeof target !== "string") {
|
|
77369
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
77370
|
-
}
|
|
77367
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
77371
77368
|
const targetID = this.id(operation.type, target);
|
|
77372
77369
|
if (!targetID) {
|
|
77373
77370
|
continue;
|
|
@@ -77567,7 +77564,7 @@ var CacheInternal = class {
|
|
|
77567
77564
|
};
|
|
77568
77565
|
}
|
|
77569
77566
|
id(type, data2) {
|
|
77570
|
-
const id2 = typeof data2 === "
|
|
77567
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
77571
77568
|
if (!id2) {
|
|
77572
77569
|
return null;
|
|
77573
77570
|
}
|
|
@@ -132235,7 +132232,8 @@ var CachePolicy = {
|
|
|
132235
132232
|
CacheOrNetwork: "CacheOrNetwork",
|
|
132236
132233
|
CacheOnly: "CacheOnly",
|
|
132237
132234
|
NetworkOnly: "NetworkOnly",
|
|
132238
|
-
CacheAndNetwork: "CacheAndNetwork"
|
|
132235
|
+
CacheAndNetwork: "CacheAndNetwork",
|
|
132236
|
+
NoCache: "NoCache"
|
|
132239
132237
|
};
|
|
132240
132238
|
var PaginateMode = {
|
|
132241
132239
|
Infinite: "Infinite",
|
|
@@ -134383,10 +134381,7 @@ var CacheInternal2 = class {
|
|
|
134383
134381
|
});
|
|
134384
134382
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
134385
134383
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
134386
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
134387
|
-
if (typeof target !== "string") {
|
|
134388
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
134389
|
-
}
|
|
134384
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
134390
134385
|
const targetID = this.id(operation.type, target);
|
|
134391
134386
|
if (!targetID) {
|
|
134392
134387
|
continue;
|
|
@@ -134586,7 +134581,7 @@ var CacheInternal2 = class {
|
|
|
134586
134581
|
};
|
|
134587
134582
|
}
|
|
134588
134583
|
id(type, data2) {
|
|
134589
|
-
const id2 = typeof data2 === "
|
|
134584
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
134590
134585
|
if (!id2) {
|
|
134591
134586
|
return null;
|
|
134592
134587
|
}
|
|
@@ -141481,6 +141476,7 @@ enum CachePolicy {
|
|
|
141481
141476
|
${CachePolicy.CacheOnly}
|
|
141482
141477
|
${CachePolicy.CacheOrNetwork}
|
|
141483
141478
|
${CachePolicy.NetworkOnly}
|
|
141479
|
+
${CachePolicy.NoCache}
|
|
141484
141480
|
}
|
|
141485
141481
|
|
|
141486
141482
|
"""
|
|
@@ -196594,7 +196590,8 @@ var CachePolicy2 = {
|
|
|
196594
196590
|
CacheOrNetwork: "CacheOrNetwork",
|
|
196595
196591
|
CacheOnly: "CacheOnly",
|
|
196596
196592
|
NetworkOnly: "NetworkOnly",
|
|
196597
|
-
CacheAndNetwork: "CacheAndNetwork"
|
|
196593
|
+
CacheAndNetwork: "CacheAndNetwork",
|
|
196594
|
+
NoCache: "NoCache"
|
|
196598
196595
|
};
|
|
196599
196596
|
var PaginateMode2 = {
|
|
196600
196597
|
Infinite: "Infinite",
|
|
@@ -198712,10 +198709,7 @@ var CacheInternal3 = class {
|
|
|
198712
198709
|
});
|
|
198713
198710
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
198714
198711
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
198715
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
198716
|
-
if (typeof target !== "string") {
|
|
198717
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
198718
|
-
}
|
|
198712
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
198719
198713
|
const targetID = this.id(operation.type, target);
|
|
198720
198714
|
if (!targetID) {
|
|
198721
198715
|
continue;
|
|
@@ -198915,7 +198909,7 @@ var CacheInternal3 = class {
|
|
|
198915
198909
|
};
|
|
198916
198910
|
}
|
|
198917
198911
|
id(type, data2) {
|
|
198918
|
-
const id2 = typeof data2 === "
|
|
198912
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
198919
198913
|
if (!id2) {
|
|
198920
198914
|
return null;
|
|
198921
198915
|
}
|
|
@@ -264591,10 +264585,7 @@ var CacheInternal4 = class {
|
|
|
264591
264585
|
});
|
|
264592
264586
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
264593
264587
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
264594
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
264595
|
-
if (typeof target !== "string") {
|
|
264596
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
264597
|
-
}
|
|
264588
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
264598
264589
|
const targetID = this.id(operation.type, target);
|
|
264599
264590
|
if (!targetID) {
|
|
264600
264591
|
continue;
|
|
@@ -264794,7 +264785,7 @@ var CacheInternal4 = class {
|
|
|
264794
264785
|
};
|
|
264795
264786
|
}
|
|
264796
264787
|
id(type, data2) {
|
|
264797
|
-
const id2 = typeof data2 === "
|
|
264788
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
264798
264789
|
if (!id2) {
|
|
264799
264790
|
return null;
|
|
264800
264791
|
}
|
package/build/test-esm/index.js
CHANGED
|
@@ -77356,10 +77356,7 @@ var CacheInternal = class {
|
|
|
77356
77356
|
});
|
|
77357
77357
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
77358
77358
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
77359
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
77360
|
-
if (typeof target !== "string") {
|
|
77361
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
77362
|
-
}
|
|
77359
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
77363
77360
|
const targetID = this.id(operation.type, target);
|
|
77364
77361
|
if (!targetID) {
|
|
77365
77362
|
continue;
|
|
@@ -77559,7 +77556,7 @@ var CacheInternal = class {
|
|
|
77559
77556
|
};
|
|
77560
77557
|
}
|
|
77561
77558
|
id(type, data2) {
|
|
77562
|
-
const id2 = typeof data2 === "
|
|
77559
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
77563
77560
|
if (!id2) {
|
|
77564
77561
|
return null;
|
|
77565
77562
|
}
|
|
@@ -132226,7 +132223,8 @@ var CachePolicy = {
|
|
|
132226
132223
|
CacheOrNetwork: "CacheOrNetwork",
|
|
132227
132224
|
CacheOnly: "CacheOnly",
|
|
132228
132225
|
NetworkOnly: "NetworkOnly",
|
|
132229
|
-
CacheAndNetwork: "CacheAndNetwork"
|
|
132226
|
+
CacheAndNetwork: "CacheAndNetwork",
|
|
132227
|
+
NoCache: "NoCache"
|
|
132230
132228
|
};
|
|
132231
132229
|
var PaginateMode = {
|
|
132232
132230
|
Infinite: "Infinite",
|
|
@@ -134374,10 +134372,7 @@ var CacheInternal2 = class {
|
|
|
134374
134372
|
});
|
|
134375
134373
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
134376
134374
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
134377
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
134378
|
-
if (typeof target !== "string") {
|
|
134379
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
134380
|
-
}
|
|
134375
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
134381
134376
|
const targetID = this.id(operation.type, target);
|
|
134382
134377
|
if (!targetID) {
|
|
134383
134378
|
continue;
|
|
@@ -134577,7 +134572,7 @@ var CacheInternal2 = class {
|
|
|
134577
134572
|
};
|
|
134578
134573
|
}
|
|
134579
134574
|
id(type, data2) {
|
|
134580
|
-
const id2 = typeof data2 === "
|
|
134575
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
134581
134576
|
if (!id2) {
|
|
134582
134577
|
return null;
|
|
134583
134578
|
}
|
|
@@ -141472,6 +141467,7 @@ enum CachePolicy {
|
|
|
141472
141467
|
${CachePolicy.CacheOnly}
|
|
141473
141468
|
${CachePolicy.CacheOrNetwork}
|
|
141474
141469
|
${CachePolicy.NetworkOnly}
|
|
141470
|
+
${CachePolicy.NoCache}
|
|
141475
141471
|
}
|
|
141476
141472
|
|
|
141477
141473
|
"""
|
|
@@ -196584,7 +196580,8 @@ var CachePolicy2 = {
|
|
|
196584
196580
|
CacheOrNetwork: "CacheOrNetwork",
|
|
196585
196581
|
CacheOnly: "CacheOnly",
|
|
196586
196582
|
NetworkOnly: "NetworkOnly",
|
|
196587
|
-
CacheAndNetwork: "CacheAndNetwork"
|
|
196583
|
+
CacheAndNetwork: "CacheAndNetwork",
|
|
196584
|
+
NoCache: "NoCache"
|
|
196588
196585
|
};
|
|
196589
196586
|
var PaginateMode2 = {
|
|
196590
196587
|
Infinite: "Infinite",
|
|
@@ -198702,10 +198699,7 @@ var CacheInternal3 = class {
|
|
|
198702
198699
|
});
|
|
198703
198700
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
198704
198701
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
198705
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
198706
|
-
if (typeof target !== "string") {
|
|
198707
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
198708
|
-
}
|
|
198702
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
198709
198703
|
const targetID = this.id(operation.type, target);
|
|
198710
198704
|
if (!targetID) {
|
|
198711
198705
|
continue;
|
|
@@ -198905,7 +198899,7 @@ var CacheInternal3 = class {
|
|
|
198905
198899
|
};
|
|
198906
198900
|
}
|
|
198907
198901
|
id(type, data2) {
|
|
198908
|
-
const id2 = typeof data2 === "
|
|
198902
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
198909
198903
|
if (!id2) {
|
|
198910
198904
|
return null;
|
|
198911
198905
|
}
|
|
@@ -264580,10 +264574,7 @@ var CacheInternal4 = class {
|
|
|
264580
264574
|
});
|
|
264581
264575
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
264582
264576
|
this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
|
|
264583
|
-
} else if (operation.action === "delete" && operation.type) {
|
|
264584
|
-
if (typeof target !== "string") {
|
|
264585
|
-
throw new Error("Cannot delete a record with a non-string ID");
|
|
264586
|
-
}
|
|
264577
|
+
} else if (operation.action === "delete" && operation.type && target) {
|
|
264587
264578
|
const targetID = this.id(operation.type, target);
|
|
264588
264579
|
if (!targetID) {
|
|
264589
264580
|
continue;
|
|
@@ -264783,7 +264774,7 @@ var CacheInternal4 = class {
|
|
|
264783
264774
|
};
|
|
264784
264775
|
}
|
|
264785
264776
|
id(type, data2) {
|
|
264786
|
-
const id2 = typeof data2 === "
|
|
264777
|
+
const id2 = typeof data2 === "object" ? this.computeID(type, data2) : data2;
|
|
264787
264778
|
if (!id2) {
|
|
264788
264779
|
return null;
|
|
264789
264780
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-svelte",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.39",
|
|
4
4
|
"description": "The svelte plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"type": "module",
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/minimatch": "^5.1.2",
|
|
22
|
+
"prettier-plugin-svelte": "^2.9.0",
|
|
22
23
|
"vitest": "^0.28.3",
|
|
23
24
|
"scripts": "^1.0.0"
|
|
24
25
|
},
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"rollup": "^3.7.4",
|
|
33
34
|
"svelte": "^3.57.0",
|
|
34
35
|
"vite": "^4.1.1",
|
|
35
|
-
"houdini": "^1.2.
|
|
36
|
+
"houdini": "^1.2.39"
|
|
36
37
|
},
|
|
37
38
|
"files": [
|
|
38
39
|
"build"
|