graphprotocol / graphprotocol/graph-node

Timeseries of a single entity

Open
#4,040 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/graphql Stale
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:

  1. Direct raw queries over postgres
  2. Write a custom resolver

Would be helpful if someone can answer how I can go about doing both of these things.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.