In Explorer, we need to display data from Iroha in pages, lazily, not all at once. However, we need to display the total amount of pages.
Problem
Currently it is not possible to determine the total amount of domains/assets/accounts/etc without fetching data completely.
Although, for blocks/transactions/peers it is possible to get their total current amount via GET /status.
Possible solution
Provide a total amount of items with iterable query response (only the first or on all consecutive ones as well?)
Introduce an alternate mode of querying: sending just the same query (e.g. FindDomains, set pagination and filters), but also setting a flag (e.g. count), so that the response would be a number of items, not the items themselves. Seems like overhead.
Use case
In Explorer, we need to display data from Iroha in pages, lazily, not all at once. However, we need to display the total amount of pages.
Problem
Currently it is not possible to determine the total amount of domains/assets/accounts/etc without fetching data completely.
Although, for blocks/transactions/peers it is possible to get their total current amount via
GET /status
.Possible solution
FindDomains
, set pagination and filters), but also setting a flag (e.g.count
), so that the response would be a number of items, not the items themselves. Seems like overhead.