Pre-indexed collections has incorrect count
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Some collections that were pre-indexed, does not calculate with the update of supply,
therefore
you have 7 items and one count
**To Reproduce**
Steps to reproduce the behavior:
- https://deploy-preview-10670--koda-canary.netlify.app/base/collection/0x724d751106fc124583a3a27476c3700e776d2796?page=Infinity
**Expected behavior**
I expect that
`select nft_count from collection_entity where id = ${id}`
should be equal to
`select count(*) as nft_count from nft_entity where collection_id = ${id}`
**Screenshots**


**Additional context**
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the pre-indexed collection shown at the reproduction URL and inspect how collection_entity.nft_count is updated against the nft_entity rows for the same collection_id. Compare the two SQL counts before and after supply updates. Done means the stored collection count matches the number of related NFT records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100