Granola-Team / mina-indexer

The Mina Indexer is a re-imagined version of the software collectively called the "Mina archive node."
Apache License 2.0
18 stars 10 forks source link

`Unique Block Producers` stat is awkwardly located in blocks GQL endpoint #1329

Open n1tranquilla opened 1 month ago

n1tranquilla commented 1 month ago

While the stat of unique block producers in last x blocks is related to blocks, it is awkwardly located within the blocks query. It might be more suitably located in the summary endpoint, as it is a stat on blocks as a whole.

trevorbernard commented 1 month ago

https://github.com/Granola-Team/mina-indexer/pull/1326#issuecomment-2245092745

n1tranquilla commented 1 month ago

https://github.com/Granola-Team/mina-block-explorer/pull/949/files

This PR could have been one or two lines of code if the summary endpoint was used. If this pattern continues of placing stats in other endpoints, we can expect each new state to require 50+ lines of code instead of a single one or two.