Skip to content

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

@Natkamon

Description

@Natkamon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions