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

Newest List for Basilisk #3570

Closed
yangwao opened this issue Jul 26, 2022 · 12 comments · Fixed by #3693
Closed

Newest List for Basilisk #3570

yangwao opened this issue Jul 26, 2022 · 12 comments · Fixed by #3693
Labels
$ ~<50usd A-basilisk issues related to basilisk parachain A-landing issues related to landing page A-subsquid indexer issues to subsquid p2 core functionality, or is affecting 60% of app

Comments

@yangwao
Copy link
Member

yangwao commented Jul 26, 2022

I guess adding the same component as we have for RMRK, but for Basilisk on Landing would be nice.

image

@yangwao yangwao added $ ~<50usd p2 core functionality, or is affecting 60% of app A-basilisk issues related to basilisk parachain A-landing issues related to landing page labels Jul 26, 2022
@zhengow
Copy link
Contributor

zhengow commented Jul 26, 2022

👋

@kodabot
Copy link
Collaborator

kodabot commented Jul 26, 2022

ASSIGNED - @zhengow 🔒 LOCKED -> Wednesday, July 27th 2022, 22:34:29 UTC -> 36 hours

@Jarsen136
Copy link
Contributor

Just FYI, we have better write a resolver in snek to avoid duplicate items in landing page. @zhengow
Ref: #3059

@zhengow
Copy link
Contributor

zhengow commented Jul 26, 2022

Just FYI, we have better write a resolver in snek to avoid duplicate items in landing page. @zhengow Ref: #3059

Thanks for your information:)
But how about get newest list using this query, and filter it if it has the same id, I think maybe there is no need to write a new resolver?

query MyQuery {
  events(where: {interaction_eq: LIST}, orderBy: timestamp_DESC) {
    nft {
      metadata
      meta {
        image
        name
      }
      currentOwner
      issuer
    }
    id
    timestamp
  }
}

image

@roiLeo
Copy link
Contributor

roiLeo commented Jul 26, 2022

query MyQuery {
  events(where: {interaction_eq: LIST}, orderBy: timestamp_DESC) {
    nft {
      metadata
      meta {
        image
        name
      }
      currentOwner
      issuer
    }
    id
    timestamp
  }
}

With this query if I "LIST" two times (first one LISTED 10 BSX and second one LISTED 20 BSX) the same nft then it will appear duplicated in NewestList.

We had same issue with rmrk, but we fix it using a new resolver.

@yangwao yangwao added the A-subsquid indexer issues to subsquid label Jul 26, 2022
@zhengow
Copy link
Contributor

zhengow commented Jul 26, 2022

query MyQuery {
  events(where: {interaction_eq: LIST}, orderBy: timestamp_DESC) {
    nft {
      metadata
      meta {
        image
        name
      }
      currentOwner
      issuer
    }
    id
    timestamp
  }
}

With this query if I "LIST" two times (first one LISTED 10 BSX and second one LISTED 20 BSX) the same nft then it will appear duplicated in NewestList.

We had same issue with rmrk, but we fix it using a new resolver.

Yes, that's true, I understand. But how about I filter the array that I query to avoid same id nft?

@zhengow
Copy link
Contributor

zhengow commented Jul 26, 2022

Maybe I query 15 newest list, and filter them without same id, maybe let's say 12 nfts left, then I take first 10?

@Jarsen136
Copy link
Contributor

Maybe I query 15 newest list, and filter them without same id, maybe let's say 12 nfts left, then I take first 10?

There always are some edge cases that could not be solved in the frontend : )
What if the newest 20 nfts have the same id?

@roiLeo
Copy link
Contributor

roiLeo commented Jul 26, 2022

Yes, that's true, I understand. But how about I filter the array that I query to avoid same id nft?

Do you mean on the client side? in js?
not the best solution but If you find a way to filter them with gql go on

@zhengow
Copy link
Contributor

zhengow commented Jul 26, 2022

ok, I will write a resolver to solve these two issues, but I think @vikiival is a little busy recent, last PR is still block though 👀

@vikiival
Copy link
Member

vikiival commented Jul 26, 2022

I will write a resolver to solve these two issues

Go for it :)

last kodadot/rubick#107 is still block though

had to recheck tbh.

@kodabot
Copy link
Collaborator

kodabot commented Jul 27, 2022

ASSIGNMENT EXPIRED - @zhengow has been unassigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$ ~<50usd A-basilisk issues related to basilisk parachain A-landing issues related to landing page A-subsquid indexer issues to subsquid p2 core functionality, or is affecting 60% of app
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

6 participants