hyperlane-xyz / hyperlane-explorer

Web app for the Hyperlane Explorer
https://explorer.hyperlane.xyz
Other
50 stars 46 forks source link

Search query error when change selected chain #91

Closed tiendn closed 2 days ago

tiendn commented 2 days ago

Description

In explorer UI When I select all testnet in Destination Chain, then back unchecked Mainnet, it query with some chainID not bigint type like this below

{
  "query": "query ($search: bytea, $originChains: [bigint!], $destinationChains: [bigint!], $startTime: timestamp, $endTime: timestamp) @cached(ttl: 5) {\n  q0: message_view(\n    where: {_and: [{destination_chain_id: {_in: $destinationChains}}]}\n    order_by: {id: desc}\n    limit: 20\n  ) {\n    id\n    msg_id\n    nonce\n    sender\n    recipient\n    is_delivered\n    send_occurred_at\n    delivery_occurred_at\n    delivery_latency\n    origin_chain_id\n    origin_domain_id\n    origin_tx_id\n    origin_tx_hash\n    origin_tx_sender\n    destination_chain_id\n    destination_domain_id\n    destination_tx_id\n    destination_tx_hash\n    destination_tx_sender\n    __typename\n  }\n}",
  "variables": {
    "destinationChains": [
      "97",
      "122",
      "252",
      "690",
      "1329",
      "7000",
      "10200",
      "10243",
      "17000",
      "22222",
      "34443",
      "43113",
      "44787",
      "59144",
      "84532",
      "88002",
      "421614",
      "534351",
      "984123",
      "11155111",
      "161221135",
      "239092742",
      "1399811149",
      "1399811150",
      "1399811151",
      "injective-1",
      "neutron-1",
      "osmosis-1",
      "stride-1"
    ]
  }
}

It seems some code incident add some chainid not right type

Expectation

Remove string chainid from query

DEMO

https://github.com/hyperlane-xyz/hyperlane-explorer/assets/15717476/b41d39ce-bbed-4487-a351-d2c2f6acbaf6