Skip to content

Commit

Permalink
docs: changeset for indexer/store sync table IDs param (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Sep 29, 2023
1 parent 4998d69 commit 4081493
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .changeset/nice-bikes-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
"@latticexyz/store-indexer": minor
"@latticexyz/store-sync": minor
---

Added a `tableIds` parameter to store sync methods and indexer to allow filtering data streams by table IDs. Store sync methods automatically include all internal table IDs from Store and World.

```ts
import { syncToRecs } from "@latticexyz/store-sync/recs";
import { resourceIdToHex } from "@latticexyz/common";

syncToRecs({
...
tableIds: [resourceIdToHex(...)],
});
```

```ts
import { createIndexerClient } from "@latticexyz/store-sync/trpc-indexer";
import { resourceIdToHex } from "@latticexyz/common";

const client = createIndexerClient({ ... });
client.findAll({
...
tableIds: [resourceIdToHex(...)],
});
```

0 comments on commit 4081493

Please sign in to comment.