[Feature] Query all time-travel versions of an entity as a list
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
The issue provides a GraphQL example for querying time-travel versions but names no files, tests, or implementation entry points. Clarify the schema and storage design with maintainers first; done should include a defined query for historical entity versions and tests covering its results.
Written by the indexing model from the issue text.
Description
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
To query a time-travel version of an entity, you have to specify a block number/hash and you can only query one version at a time.
When you display the history of an entity, you need to store a separate immutable snapshot entity every time the main entity changes. It's a very OK strategy but feels like a waste when behind the scenes there's already a history stored in the database (if I'm not mistaken).
What is the expected behavior?
Enable to query all the time-travel versions of an entity, without any knowledge of blocks the entity changed at. Example of a GraphQL query:
query getBalanceHistory {
balance(id: "example_id") {
currentBalance
timeTravelVersions(first: 10) { # This is a collection on every mutable entity where you can get all the time-travel versions from.
currentBalance
blockNumber
}
}
}
Why do I need this?
To do historical visualizations of entities (namely balances).
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 1.1k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
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.
More from graphprotocol/graph-node
-
current: include emits an all-null bucket for dimensionless aggregations, nulling the whole response Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
graphprotocol/graph-node#6719 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
graphprotocol/graph-node#6673 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
graphprotocol/graph-node#6650 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
graphprotocol/graph-node#6722 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
graphprotocol/graph-node#6721 ·
All issues in graphprotocol/graph-node
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100