Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit b541732

Browse files
authored
Merge pull request #691 from roiLeo/feature/gallery/hideBurnedNFT
feat(gallery): query to hide burned nft
2 parents 09baeb9 + b7a8af3 commit b541732

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

src/components/rmrk/Gallery/Search/query.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ const queryOf = (criteria: QueryType) => new Query(criteria)
2828

2929
export const basicAggregation = (): Aggregator => {
3030
const agg: Aggregation = [
31+
{
32+
$match: {
33+
burned: { $ne: true }
34+
}
35+
},
3136
{
3237
$group: {
3338
_id: { image: '$image', collection: '$collection' },

src/queries/collectionById.graphql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
query collectionById($id: String!) {
44
collectionEntity(id: $id) {
55
...collection
6-
nfts {
6+
nfts(filter: { burned: { distinctFrom: true } }) {
77
nodes {
88
id
99
metadata
1010
name
1111
price
12+
burned
1213
}
1314
}
1415
}

src/queries/firstNftByIssuer.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ query firstNftByIssuer($account: String!) {
55
filter: {
66
issuer: { equalTo: $account }
77
name: { notLike: "%Kanaria%" }
8+
burned: { distinctFrom: true }
89
}
910
orderBy: BLOCK_NUMBER_DESC
1011
first: 1

src/queries/nftListByIssuer.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ query nftListByIssuer($account: String!, $first: Int!, $offset: Int) {
55
filter: {
66
issuer: { equalTo: $account }
77
name: { notLike: "%Kanaria%" }
8+
burned: { distinctFrom: true }
89
}
910
orderBy: BLOCK_NUMBER_DESC
1011
first: $first

src/queries/nftListCollected.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ query nftListCollected($account: String!, $first: Int!, $offset: Int) {
66
issuer: { notEqualTo: $account }
77
currentOwner: { equalTo: $account }
88
name: { notLike: "%Kanaria%" }
9+
burned: { distinctFrom: true }
910
}
1011
orderBy: BLOCK_NUMBER_DESC
1112
first: $first

src/queries/nftListSold.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ query nftListSold($account: String!, $first: Int!, $offset: Int) {
66
issuer: { equalTo: $account }
77
currentOwner: { notEqualTo: $account }
88
name: { notLike: "%Kanaria%" }
9+
burned: { distinctFrom: true }
910
}
1011
orderBy: BLOCK_NUMBER_DESC
1112
first: $first

0 commit comments

Comments
 (0)