Case insensitive partial token search

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?

query TokenSearch ($tokenNames: [String!]) {
    ethereum(network: bsc) {
        transfers(
            currency: [{in: $tokenNames}],
            options: {limit: 10, desc: ["count"]}
        ) {
            currency {
                name
                address
                symbol
                tokenType
                decimals
            }
            count(uniq: transfers)
        }
    }
}

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.

As of now only USDT, BTC and ETH are supported.

That is not really a true. If I try this query

 {
  ethereum(network: bsc) {
  transfers(
            currency: [{in: "moon"}],
            options: {limit: 10, desc: ["count"]}
        ) {
            currency {
                name
                address
                symbol
                tokenType
                decimals
            }
            count(uniq: transfers)
        }
}
  }

I get a following response

{
  "ethereum": {
    "transfers": [
      {
        "currency": {
          "name": "moon",
          "address": "0x64a756d81c1c21935626038a96f7e92ed1b4ccc0",
          "symbol": "moon",
          "tokenType": "ERC20",
          "decimals": 9
        },
        "count": 623
      },
      {
        "currency": {
          "name": "Binanmoon",
          "address": "0xc96cd1e9bf97d956516fa19a346c3809667d492d",
          "symbol": "moon",
          "tokenType": "ERC20",
          "decimals": 8
        },
        "count": 241
      },
      {
        "currency": {
          "name": "spacexmoon",
          "address": "0xffa635a0f9c61f85d0d954be4ab3641be439037f",
          "symbol": "moon",
          "tokenType": "ERC20",
          "decimals": 9
        },
        "count": 108
      },
      {
        "currency": {
          "name": "moonb",
          "address": "0xf08c68629bdb0d04136bee7b49da7060a0a7e6ce",
          "symbol": "moon",
          "tokenType": "ERC20",
          "decimals": 18
        },
        "count": 37
      },
... and more

We also have a search API. May be this help

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.

Try this

{
  search(string: "MO%", network: bsc) {
    network {
      network
    }
    subject {
      ... on Currency {
        symbol
        name
        address
      }
    }
  }
}


this is giving me errors now

It’s working now, please check. Search API was having some issues. Now it’s fixed.