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

feat(gallery): query to hide burned nft #691

Merged
merged 8 commits into from
Sep 7, 2021
5 changes: 5 additions & 0 deletions src/components/rmrk/Gallery/Search/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ const queryOf = (criteria: QueryType) => new Query(criteria)

export const basicAggregation = (): Aggregator => {
const agg: Aggregation = [
{
$match: {
burned: { $ne: true }
}
},
{
$group: {
_id: { image: '$image', collection: '$collection' },
Expand Down
3 changes: 2 additions & 1 deletion src/queries/collectionById.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
query collectionById($id: String!) {
collectionEntity(id: $id) {
...collection
nfts {
nfts(filter: { burned: { distinctFrom: true } }) {
vikiival marked this conversation as resolved.
Show resolved Hide resolved
nodes {
id
metadata
name
price
burned
vikiival marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/queries/firstNftByIssuer.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ query firstNftByIssuer($account: String!) {
filter: {
issuer: { equalTo: $account }
name: { notLike: "%Kanaria%" }
burned: { distinctFrom: true }
}
orderBy: BLOCK_NUMBER_DESC
first: 1
Expand Down
1 change: 1 addition & 0 deletions src/queries/nftListByIssuer.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ query nftListByIssuer($account: String!, $first: Int!, $offset: Int) {
filter: {
issuer: { equalTo: $account }
name: { notLike: "%Kanaria%" }
burned: { distinctFrom: true }
}
orderBy: BLOCK_NUMBER_DESC
first: $first
Expand Down
1 change: 1 addition & 0 deletions src/queries/nftListCollected.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ query nftListCollected($account: String!, $first: Int!, $offset: Int) {
issuer: { notEqualTo: $account }
currentOwner: { equalTo: $account }
name: { notLike: "%Kanaria%" }
burned: { distinctFrom: true }
}
orderBy: BLOCK_NUMBER_DESC
first: $first
Expand Down
1 change: 1 addition & 0 deletions src/queries/nftListSold.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ query nftListSold($account: String!, $first: Int!, $offset: Int) {
issuer: { equalTo: $account }
currentOwner: { notEqualTo: $account }
name: { notLike: "%Kanaria%" }
burned: { distinctFrom: true }
}
orderBy: BLOCK_NUMBER_DESC
first: $first
Expand Down