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

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

Open n1tranquilla opened this issue 6 months 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"
  }
}

n1tranquilla avatar Aug 08 '24 12:08 n1tranquilla