duality-labs / hapi-indexer

A Node.js based indexer for the Duality Cosmos chain
1 stars 0 forks source link

Improve block_range query parameter usage consistency #65

Open dib542 opened 10 months ago

dib542 commented 10 months ago

The current query parameters in the Indexer API are a bit awkward and could be made much more consistent with a few changes.

While documenting the Indexer API for some possible Neutron partnerships in https://hadron.notion.site/Indexer-API-a2eabb732292453196332cb2727e53f7 I realized that the query parameters I made to "follow" the regular CosmosSDK API pagination parameters were very inconsistent:

In particular, these aren't pagination parameters and by that I mean: they don't affect pagination. These are filter parameters which affect the range of data that should be queried. After the creation of the block_range query parameters:

It makes sense to align these together into query parameters that by their naming convention filter the requested block range: