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

✨ collection totalItems & updatedAt #153

Merged
merged 4 commits into from
Oct 18, 2022

Conversation

roiLeo
Copy link
Contributor

@roiLeo roiLeo commented Oct 13, 2022

Thank you for your contribution to the KodaDot Indexer.
👇 _ Let's make a quick check before the contribution.

PR type

  • Bugfix
  • Feature

What's new?

Before submitting Pull Request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried to respect high code quality standards
  • I've didn't break any original functionality
  • I've posted a screenshot of demonstrated change in this PR

Optional

  • I've run the indexer and it hasn't failed
  • I've changed schema and performed a migration

Screenshot

Capture d’écran 2022-10-13 à 2 00 29 PM

Copy link
Member

@vikiival vikiival left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thanks for the PR!.

Make sure to test it and I would presonally changed the name

schema.graphql Outdated
Comment on lines 31 to 32
totalItems: Int!
totalAvailableItems: Int!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
totalItems: Int!
totalAvailableItems: Int!
nftCount: Int!
supply: Int!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't commit your suggestion as we will clearly need to recreate a migration file
nftCount & supply feels meh :/ (from the perspective of a dev I find it hard to tell the difference) but I'll change that

@roiLeo
Copy link
Contributor Author

roiLeo commented Oct 17, 2022

✅ updatd

Capture d’écran 2022-10-17 à 12 28 35 PM

@roiLeo roiLeo requested a review from vikiival October 17, 2022 10:30
@vikiival
Copy link
Member

@roiLeo can you please run this query?

query MyQuery {
  collectionEntities(limit: 5, where: {nfts_some: {burned_eq: true}}) {
    id
    nftCount
    supply
    nfts {
      id
      burned
    }
  }
}

@vikiival
Copy link
Member

to check if we count it correctly

@roiLeo
Copy link
Contributor Author

roiLeo commented Oct 17, 2022

After a while:
Capture d’écran 2022-10-17 à 1 56 50 PM

Capture d’écran 2022-10-17 à 2 21 38 PM

Capture d’écran 2022-10-17 à 2 24 05 PM

something wrong? might come from plsBe(real, ...)

@vikiival
Copy link
Member

It comes from the consolidator saying that the entity needs to be real (exist) in DB to perform a buy. It is ok.

kodadot/packages#64

@vikiival vikiival added this to the 008 milestone Oct 18, 2022
@vikiival
Copy link
Member

Will go out with milestone 008

@vikiival vikiival merged commit cde8380 into kodadot:main Oct 18, 2022
@vikiival vikiival mentioned this pull request Oct 18, 2022
vikiival added a commit that referenced this pull request Oct 25, 2022
@vikiival vikiival mentioned this pull request Apr 4, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Count NFTs in the Collection Entity
2 participants