cardano-graphql
cardano-graphql copied to clipboard
No metadata in paymentAddress query
No metadata in the following query:
query paymentAddressSummary {
paymentAddresses(
addresses: [
"addr1q856yfy7yfc7hv2p8prx4djyu7wmnj3v36ez8eexrupvyugzyu8ye3d6u3f30g2mn2r02rjkc9uzsz3et2ykhvgjy0kqyax9sc"
]
) {
summary(atBlock: 6030397) {
utxosCount
assetBalances {
quantity
asset {
assetName
policyId
fingerprint
assetId
tokenMints {
quantity
transaction {
hash
metadata {
key
value
}
}
}
}
}
}
}
}
Unfortunately this is a known limitation as the resolver only returns the hash in this context. We either need to type this response separately, or change the design to make it work as expected. In the mean-time I suggest using the following query as a base, then include the fields currently missing:
https://github.com/input-output-hk/cardano-graphql/blob/754d9e9acc31a75b3f786cac5553bd3155e6a968/packages/api-cardano-db-hasura/src/HasuraClient.ts#L335-L405
Thanks for the clarification
I'll leave this issue open since it's unresolved
Hi seem like this is not resolved yet, did anyone find manage to find a workaround? Querying all assets based on policy id and remapping through asset id is an option but not so elegant solution.