protocol-subgraphs icon indicating copy to clipboard operation
protocol-subgraphs copied to clipboard

Error Querying userReserve {id} Field in Protocol V3 Mainnet Subgraph

Open Natkamon opened this issue 1 year ago • 0 comments

Describe the bug When querying historical supply data for the "Protocol V3 Mainnet" subgraph, an error occurs related to the userReserve {id} field on the supplies query. This prevents the query from successfully returning data.

To Reproduce Query

{
  supplies(first: 1000, skip: 0, orderBy: timestamp, where: {timestamp_gte: 1700611200, timestamp_lt: 1700697600}) {
    id,
    txHash,
    action,
    timestamp,
    pool { id },
    user { id },
    caller { id },
    reserve { id, underlyingAsset, symbol, name },
    userReserve { id },
    referrer { id },
    amount,
    assetPriceUSD
  }
}

Response

{
  "data": null,
  "errors": [
    {
      "message": "Null value resolved for non-null field `userReserve`",
      "locations": [{"line": 22, "column": 3}]
    }
  ]
}

Expected behavior The query should return a list of data without encountering errors, even if the userReserve {id} field is null or missing.

Natkamon avatar Dec 25 '24 19:12 Natkamon