graphprotocol / graphprotocol/graph-node

Add deploymentTimestamp and firstTimeFullySyncedTimestamp to SubgraphIndexingStatus

Open
#3,635 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Stale
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

It would be great for subgraph developers to find out how long their subgraph took to fully sync for the first time. This could be enabled by changing the type SubgraphIndexingStatus here to the following shape:

type SubgraphIndexingStatus {
  subgraph: String!
  synced: Boolean!

  # Note that the health can be implied from fatalError and nonFatalErrors:
  # - If fatalError is non-null, then health is 'failed'.
  # - Else if nonFatalErrors is non-empty, then health is 'unhealthy'.
  # - Else health is 'healthy'.
  health: Health!

  "If the subgraph has failed, this is the error caused it"
  fatalError: SubgraphError
  "Sorted from first to last, limited to first 1000"
  nonFatalErrors: [SubgraphError!]!
  chains: [ChainIndexingStatus!]!
  entityCount: BigInt!
  node: String
  deploymentTimestamp: BigInt! # <- Added 
  firstTimeFullySyncedTimestamp: BigInt # <- Added, not required because it's empty during sync
}

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

Start with the SubgraphIndexingStatus definition in server/index-node/src/schema.graphql and trace where its values are assembled. Check how deployment and first full synchronization times can be obtained, then expose both fields with the requested required and nullable behavior. Done means the schema and its responses include accurate timestamps, with the first-sync field empty during synchronization.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.