Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
0x009922 opened this issue Aug 20, 2024 · 1 comment · Fixed by #5016
Closed

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

0x009922 opened this issue Aug 20, 2024 · 1 comment · Fixed by #5016
Assignees
Labels
api-changes Changes in the API for client libraries Enhancement New feature or request queries

Comments

@0x009922
Copy link
Contributor

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

  • 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.
  • Other options?
@0x009922 0x009922 added Enhancement New feature or request api-changes Changes in the API for client libraries queries labels Aug 20, 2024
@mversic
Copy link
Contributor

mversic commented Aug 21, 2024

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

this is the way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes Changes in the API for client libraries Enhancement New feature or request queries
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants