[Feature] Query all time-travel versions of an entity as a list

オープン
#3,480 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
graphql
領域
api, backend

調査の方向性

この issue にはタイムトラベルバージョンをクエリする GraphQL の例が示されていますが、ファイル、テスト、実装のエントリーポイントは示されていません。まずメンテナーとスキーマおよびストレージの設計を明確にしてください。完了条件には、履歴上のエンティティバージョンを取得する定義済みのクエリと、その結果を対象とするテストを含める必要があります。

索引モデルが issue の本文から書いたものです。

説明

area/graphql Stale

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時間
マージ済み PR(30日)
1

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

graphprotocol/graph-node のほかの issue

graphprotocol/graph-node の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。