graph-node icon indicating copy to clipboard operation
graph-node copied to clipboard

Add deploymentTimestamp and firstTimeFullySyncedTimestamp to SubgraphIndexingStatus

Open schmidsi opened this issue 3 years ago • 0 comments

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
}

schmidsi avatar Jun 06 '22 22:06 schmidsi