aave / aave/protocol-subgraphs
Error Querying userReserve {id} Field in Protocol V3 Mainnet Subgraph
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 150
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied supplies query against the Protocol V3 Mainnet subgraph and inspect the userReserve field in the subgraph schema and mappings. Trace why userReserve resolves null for historical supplies, then verify that the query returns data when that relationship is absent or null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- backend-api-design, blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100