[Feature] Query all time-travel versions of an entity as a list
还没有人认领这个 Issue。
评估
调研方向
该 issue 提供了一个用于查询时间旅行版本的 GraphQL 示例,但没有指明文件、测试或实现入口。请先与维护者明确 schema 和存储设计;完成标准应包括一个用于查询实体历史版本的已定义查询,以及覆盖其结果的测试。
由索引模型根据 Issue 内容生成。
描述
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).
- 主要语言
- Rust
- 星标
- 3.2k
- 派生
- 1.1k
- 平均合并
- 4 天 1 小时
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
graphprotocol/graph-node 的其他 Issue
-
current: include emits an all-null bucket for dimensionless aggregations, nulling the whole response 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
graphprotocol/graph-node#6719 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
graphprotocol/graph-node#6673 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
graphprotocol/graph-node#6650 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
graphprotocol/graph-node#6722 ·
-
难度 3/5 1-2 天 新手友好度 68/100
graphprotocol/graph-node#6721 ·
查看 graphprotocol/graph-node 的全部 Issue
相似的 Issue
-
risk:low runtime status:in-progress type:test
难度 1/5 1 小时以内 新手友好度 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 1/5 1 小时以内 新手友好度 72/100
bevyengine/bevy#25861 ·