graphprotocol / graphprotocol/graph-node
Timeseries of a single entity
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 1.1k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
Do you want to request a feature or report a bug?
Feature request of kinds, but just looking for some answers.
Subgraph has supported timetravel queries that allow you to retrieve entities at particular block. I am looking for a way to get historical state of a singleton entity over a given block range. Use case being imagine you wanted to get a timeseries of total supply of ERC20, or chainlink's latest answer stored in a singleton entity to query a timeseries of oracle answer. I imagine there can be 2 ways this can be done:
- Direct raw queries over postgres
- Write a custom resolver
Would be helpful if someone can answer how I can go about doing both of these things.
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
No file or test is named. Start by tracing the existing timetravel query entry point, then compare the raw PostgreSQL and custom-resolver approaches described in the issue; done would be a maintainer-confirmed answer or documented implementation path for singleton history across a block range.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgres
- Domain
- api, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100