cardano-graphql
cardano-graphql copied to clipboard
Where for partially matching string
Is there any way to query for a partially matched string? Maybe the parameter "_like".
query assets {
assets(
limit: 20
offset: 0
where: { assetName: { _in: "5370616365" } }
) {
assetId
assetName
}
}
5370616365 is "Space" in hex, so I want to find all SpaceBudz assets for example.
There are _like
and _ilike
operators, but they are unfortunately not available for bytea
data type. I think it is worth decoding the assetName
at the point of discovering the asset on chain, and storing it alongside as text
to facilitate this.
https://hasura.io/blog/full-text-search-with-hasura-graphql-api-postgres/
There are
_like
and_ilike
operators, but they are unfortunately not available forbytea
data type. I think it is worth decoding theassetName
at the point of discovering the asset on chain, and storing it alongside astext
to facilitate this.https://hasura.io/blog/full-text-search-with-hasura-graphql-api-postgres/
If possible, it would be great to make searches with case insensitive queries. We have created an NFT explorer and it is very important to avoid search problems in this case - https://minterr.io/explorer/?name=space
Thank you!