mina-indexer icon indicating copy to clipboard operation
mina-indexer copied to clipboard

`TransactionQueryInput` query crashes for some `dateTimeGte` and `limit` combinations

Open nathan-tranquilla opened this issue 1 year ago • 1 comments

Case A: Crashing case

Query:

query TransactionsQuery($limit: Int, $sort_by: TransactionSortByInput!, $query: TransactionQueryInput!) {
  transactions(limit: $limit, sortBy: $sort_by, query: $query) {
    hash
    amount
    kind
    blockHeight
    block {
      dateTime
    }
  }
}

Variables:

{
  "limit": 10000,
  "sort_by": "BLOCKHEIGHT_DESC",
  "query": {
    "canonical": true,
    "kind": "PAYMENT",
    "dateTimeGte": "2024-06-03T00:00:00.000Z"
  }
}

Result:

{
  "errors": [
    {
      "message": "Unexpected token '<', \"<!DOCTYPE \"... is not valid JSON",
      "stack": "SyntaxError: Unexpected token '<', \"<!DOCTYPE \"... is not valid JSON"
    }
  ]
}

Case B: Non-Crashing case

Query: (same)

Variables:

{
  "limit": 10000,
  "sort_by": "BLOCKHEIGHT_DESC",
  "query": {
    "canonical": true,
    "kind": "PAYMENT",
    "dateTimeGte": "2024-06-02T00:00:00.000Z"
  }
}

nathan-tranquilla avatar Aug 08 '24 12:08 nathan-tranquilla

Blocks: https://github.com/Granola-Team/mina-block-explorer/issues/986

nathan-tranquilla avatar Aug 08 '24 12:08 nathan-tranquilla

We'll need to deploy a recent build to prod so I can check this

Isaac-DeFrain avatar Sep 12 '24 15:09 Isaac-DeFrain

Related #1539

Isaac-DeFrain avatar Sep 18 '24 16:09 Isaac-DeFrain