Hi.
I am trying to do a query to find all tokens by a partial match case insensitive match. Sofar I have something like this, but unfortunately it is case sensitive and only for full match. Is there some way to improve it?
The currency values which you can filter with the currency parameter are limited and are indeed, “case sensitive”. Would you be kind enough to share the list of $tokenNames that you are querying so that I can understand your doubt in a better way?
Thanks for the answer. $tokenNames can be e.g. [“moon”] then I would expect to find tokens with name or symbol like SafeMoon, MoonMiner, MoonKitty etc.
Thanks for the answer @gaurav . I have tried search api. Maybe I am using it wrong, but when I try something like this
{
search(string: "MO", network: bsc) {
network {
network
}
subject {
... on Currency {
symbol
name
address
}
}
}
}
I get only tokens which has exactly the name or symbol MO. I can’t seem to make it work only for partial matches or caseinsensitive. Also in ideal case I would like to be able to sort it, but that is another issue.