kodadot / nft-gallery

Generative Art Marketplace
https://koda.art
MIT License
630 stars 360 forks source link

Apply genart filter for Collections on koda.art #10991

Open vikiival opened 1 day ago

vikiival commented 1 day ago

Is your feature request related to a problem?

Currently we see the all collections on Polkadot assethub in koda.art platform. This is not nice because we would like to see only genart

Describe the solution you would like

if you visit (subdomain).koda.art there should be a default filter applied for collection explore { kind_eq: genart }

{
  collectionEntities(where: { kind_eq: genart }) {
    id
    name
    kind
    meta {
      kind
    }
  }
}

Describe alternatives you have considered

I have considered to add this also to NFTentities lmk @kodadot/internal-dev

Also this could be added as optional to existing queries so lmk if you need help with that

Screenshots

Screenshot 2024-09-17 at 09 22 25

Are there opened related issues?

vikiival commented 1 day ago

This is available only on ahp yet,

Jarsen136 commented 1 day ago

I have considered to add this also to NFTentities lmk

Yes, please add it. And maybe also some other queries like collectionEntitiesConnection nftEntitiesConnection

vikiival commented 1 day ago

And maybe also some other queries like collectionEntitiesConnection

make sure u are using v14

it is there

{
  collectionEntitiesConnection(where: { kind_eq: genart }, orderBy: id_ASC) {
    totalCount
  }
}
vikiival commented 1 day ago

Which are the cases you would need that for nftEntitiesConnection ? I am thiking you add it to nftEntities too but would like to hear if it's a valid case

Jarsen136 commented 1 day ago

Which are the cases you would need that for nftEntitiesConnection ?

queries/profileStatsById.graphql

profileStatsById {  listed: nftEntitiesConnection, sold: nftEntitiesConnection ... }

Display the correct stats of account, which only shows the stats related to genart.

I am thiking you add it to nftEntities too but would like to hear if it's a valid case

On items explore page, filter nfts that is related to genart maybe.

vikiival commented 1 day ago

you can apply it from the collection

{
  obtained: nftEntitiesConnection(where: {currentOwner_eq: $id, burned_eq: false, metadata_not_eq: "", issuer_not_in: $denyList, collection: {kind_eq: genart}}, orderBy: name_ASC) {
    totalCount
  }
}
Jarsen136 commented 20 hours ago

you can apply it from the collection

{
  obtained: nftEntitiesConnection(where: {currentOwner_eq: $id, burned_eq: false, metadata_not_eq: "", issuer_not_in: $denyList, collection: {kind_eq: genart}}, orderBy: name_ASC) {
    totalCount
  }
}

Oh, I see. That's a good idea.

Jarsen136 commented 17 hours ago

On the items explore page in ahp network, it's using tokenEntityList resolver. Is it possible to add kind type there? @vikiival