hyperledger-iroha / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
438 stars 280 forks source link

[feature request] Provide a total amount of queryable items #4984

Closed 0x009922 closed 1 month ago

0x009922 commented 2 months ago

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

mversic commented 2 months ago

Provide a total amount of items with iterable query response (only the first or on all consecutive ones as well?)

this is the way