You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the indexer adds the store.Tables table to the API response by default. This was previously used to allow the sync stack to process the logs without separately fetching the table schema.
However, this behavior is not really intuitive - i just stumbled over it when trying to use the /api/logs API to fetch the records of a specific table. It also seems reasonable to assume that a consumer requesting records from a specific table already knows the table's schema.
Unfortunately old clients might depend on the current behavior, so I see two options:
a new API version (ie /api/2/logs) that removes this behavior and updating the client libraries to use the new API
a new option for the existing API to skip the store.Tables table. Less preferred option because it doesn't fix the intuitiveness of the API.
The text was updated successfully, but these errors were encountered:
alvrs
changed the title
Add option to indexer API to not include store.Tables logs in /api/logs response
Don't default to including store.Tables logs in /api/logs response
Dec 2, 2024
Currently the indexer adds the
store.Tables
table to the API response by default. This was previously used to allow the sync stack to process the logs without separately fetching the table schema.mud/packages/store-indexer/src/sqlite/apiRoutes.ts
Line 31 in ad02d17
However, this behavior is not really intuitive - i just stumbled over it when trying to use the
/api/logs
API to fetch the records of a specific table. It also seems reasonable to assume that a consumer requesting records from a specific table already knows the table's schema.Unfortunately old clients might depend on the current behavior, so I see two options:
/api/2/logs
) that removes this behavior and updating the client libraries to use the new APIstore.Tables
table. Less preferred option because it doesn't fix the intuitiveness of the API.The text was updated successfully, but these errors were encountered: