-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
fallback nft meta is null #2749
Conversation
❌ Deploy Preview for koda-nuxt failed.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fallback
fallback is when you ask one girl for a date but in case you ask another girl just in case the first one would say no
The implementation filters out nfts which does not have meta (which is super strange :)) But the correct fallback is to take metadata
field and fetch it on the client
I mock the empty meta and then it displays all the images and works well without any error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extend queries/rmrk/subsquid/lastNftListByEvent.graphql
- extend query with metadata
query lastNftListByEvent($limit: Int!, $event: Interaction!, $and: [EventWhereInput!]) {
events(
limit: $limit
where: { interaction_eq: $event, AND: $and, nft: {burned_eq: false} }
orderBy: timestamp_DESC
) {
meta
timestamp
nft {
id
name
issuer
currentOwner
metadata
meta {
id
image
}
}
}
}
- fetch metadata
- update cache
- fetch image via cloudflare image
Now it works for me but I'm not sure if the code meets your expectation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
Are conversations resolved? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YOLO MODE ON.
pay 99 usd |
😍 Perfect, I’ve sent the payout 🪅 Let’s grab another issue and get rewarded! |
Thank you for your contribution to the KodaDot NFT gallery.
👇 _ Let's make a quick check before the contribution.
PR type
What's new?
the error is caused by the incrooect nft meta, which id is null.
![image](https://user-images.githubusercontent.com/31397967/161383573-cda270ae-fe3b-471a-8594-7494b8082d1c.png)
the nft: /rmrk/gallery/10869444-c6017764e7a1d03b5e-MOOSENFT-MAGGIE_MOOSE_29-0000000000000029
expected nft meta is an object with id and image.
![image](https://user-images.githubusercontent.com/31397967/161383614-97c9d4c2-9cad-4cc9-8da9-2ad8bddad95c.png)
Would be cool if we can filter the events in squid.
Before submitting Pull Request, please make sure:
Optional
Had issue bounty label?
Community participation
Screenshot