@secondlayer/subgraphs 3.15.0 → 3.15.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.
- package/dist/src/index.js +18 -10
- package/dist/src/index.js.map +5 -5
- package/dist/src/runtime/block-processor.js +10 -3
- package/dist/src/runtime/block-processor.js.map +4 -4
- package/dist/src/runtime/catchup.js +10 -3
- package/dist/src/runtime/catchup.js.map +4 -4
- package/dist/src/runtime/context.js +9 -2
- package/dist/src/runtime/context.js.map +3 -3
- package/dist/src/runtime/processor.js +13 -5
- package/dist/src/runtime/processor.js.map +6 -6
- package/dist/src/runtime/reindex.js +10 -3
- package/dist/src/runtime/reindex.js.map +4 -4
- package/dist/src/runtime/reorg.js +12 -4
- package/dist/src/runtime/reorg.js.map +5 -5
- package/dist/src/runtime/replay.js +2 -2
- package/dist/src/runtime/replay.js.map +2 -2
- package/dist/src/schema/index.js +9 -8
- package/dist/src/schema/index.js.map +3 -3
- package/dist/src/service.js +13 -5
- package/dist/src/service.js.map +6 -6
- package/dist/src/validate.d.ts +8 -1
- package/dist/src/validate.js +10 -8
- package/dist/src/validate.js.map +3 -3
- package/package.json +2 -2
|
@@ -281,6 +281,8 @@ class SubgraphContext {
|
|
|
281
281
|
return this.overlayMany(table, where, dbRows);
|
|
282
282
|
}
|
|
283
283
|
overlayOne(table, where, dbRow) {
|
|
284
|
+
if (this.ops.length === 0)
|
|
285
|
+
return dbRow;
|
|
284
286
|
let row = dbRow;
|
|
285
287
|
for (const op of this.ops) {
|
|
286
288
|
if (op.table !== table)
|
|
@@ -290,12 +292,17 @@ class SubgraphContext {
|
|
|
290
292
|
return row;
|
|
291
293
|
}
|
|
292
294
|
overlayMany(table, where, dbRows) {
|
|
295
|
+
if (this.ops.length === 0)
|
|
296
|
+
return [...dbRows];
|
|
293
297
|
let result = [...dbRows];
|
|
294
298
|
for (const op of this.ops) {
|
|
295
299
|
if (op.table !== table)
|
|
296
300
|
continue;
|
|
297
301
|
if (op.kind === "update") {
|
|
298
|
-
|
|
302
|
+
for (let i = 0;i < result.length; i++) {
|
|
303
|
+
if (rowMatches(result[i], op.data))
|
|
304
|
+
result[i] = { ...result[i], ...op.set ?? {} };
|
|
305
|
+
}
|
|
299
306
|
} else if (op.kind === "delete") {
|
|
300
307
|
result = result.filter((r) => !rowMatches(r, op.data));
|
|
301
308
|
} else {
|
|
@@ -1674,7 +1681,7 @@ function buildHttpClient() {
|
|
|
1674
1681
|
return new IndexHttpClient({
|
|
1675
1682
|
indexBaseUrl: baseUrl,
|
|
1676
1683
|
streamsBaseUrl: baseUrl,
|
|
1677
|
-
streamsApiKey: process.env.STREAMS_INTERNAL_API_KEY ?? "sk-
|
|
1684
|
+
streamsApiKey: process.env.STREAMS_INTERNAL_API_KEY ?? "sk-sl_streams_decode_internal"
|
|
1678
1685
|
});
|
|
1679
1686
|
}
|
|
1680
1687
|
function resolveBlockSource(subgraph) {
|
|
@@ -2433,5 +2440,5 @@ export {
|
|
|
2433
2440
|
catchUpSubgraph
|
|
2434
2441
|
};
|
|
2435
2442
|
|
|
2436
|
-
//# debugId=
|
|
2443
|
+
//# debugId=042422F50F13446F64756E2164756E21
|
|
2437
2444
|
//# sourceMappingURL=catchup.js.map
|