-
Notifications
You must be signed in to change notification settings - Fork 1
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
Stats of collection #10
Comments
Should the resolver return data per one collection? |
Yes, I think so |
I would do that as a part of collection schema |
So task is to extend collection to have type CollectionEntity @entity {
volume: BigInt!
highestSale: BigInt!
floor: BigInt!
distribution: Int!
ownerCount: Int!
} how to modify this data
|
cc @Matehoo this would imo help |
Hey @vikiival I'm not sure this will help in holders/flippers tabs in collection activity as it requires user centric data and not collection centric kodadot/nft-gallery#5388 (comment) please correct me if i'm wrong |
I'm a bit confused about the difference between distribution and ownerCount, distinct count of owners per collection and ownerCount appears to be the same thing in the context of a collection no? Should the distribution be a new entity with a distribution of NFTs/owner (count of number of NFTs per owner) for a collection? |
Let me make collection example: nfts = [
{ owner: viki, id: 1 },
{ owner: viki, id: 2 },
{ owner: ales, id: 3 },
{ owner: leo, id: 4 },
{ owner: wao, id: 5 },
]
const onlyOwners = nfts.map(x => x.owner)
const ownerCount = onlyOwners.lenght // 5
const distribution = new Set(onlyOwners).size // 4 |
🤔 in your example |
Requirement
collectionEntitiesConnection
resolver or provide a new resolverThe text was updated successfully, but these errors were encountered: