Decide when a Subgraph result is fresh enough to show and final enough to act on. A Subgraph indexes chain data over time and serves queries from the latest indexed block, which can trail the chain head. GraphOps Subgraphs are reorg-aware, so recently indexed data can be corrected when the chain reorganizes.
Metadata query
Use _meta to inspect the indexed block and indexing-error state:
GraphQL
query SyncStatus {
_meta {
deployment
block {
number
hash
}
hasIndexingErrors
}
}
Output
{ "data": { "_meta": { "deployment": "QmTZ8ejXJxRo7vDBS4uwqBeGoxLSWbhaA7oXa1RvxunLy7",The deployment that served this request "block": { "number": 26427421,Highest indexed block; track it over time "hash": "0xe6bbe9a916406b49a60992587fcb445601905716e360a01885885a3401442f83"Include in support requests }, "hasIndexingErrors": falseAlert when true } }}Freshness model
| Signal | Meaning |
|---|---|
_meta.block.number | Highest indexed block served by the Subgraph endpoint. |
_meta.block.hash | Hash of the indexed block. Use it for diagnostics. |
_meta.deployment | Deployment serving the query. Useful when testing Endpoint Alias or Graph Network Subgraph ID changes. |
_meta.hasIndexingErrors | Whether indexing errors are present for the deployment. |
Reorg-aware behavior
Reorg-aware indexing means the served entity state can be corrected after a chain reorganization. Applications should:
- Treat recently indexed data as potentially revisable.
- Use
_meta.block.numberand_meta.block.hashin logs for support and debugging. - Avoid assuming that a newly indexed entity is final for settlement or irreversible user-facing state.
- Compare the indexed block with your network's finality information before treating a result as irreversible. Elapsed time alone does not establish finality.
Apply the model
- Monitor
_metaon health checks and critical queries. - Log the endpoint mode: Deployment CID, Graph Network Subgraph ID, or Endpoint Alias.
- After changing an Endpoint Alias target, confirm
_meta.deploymentmatches the expected deployment. - If
_meta.hasIndexingErrorsis true, inspect query results carefully and contact GraphOps support(opens in a new tab).
Next steps
Last updated
Schemas and queries
Find the entities, filters, and ordering fields a Subgraph schema provides, and write queries that keep working as data grows.
Endpoint Aliases
Keep one query URL for your application while your organization chooses which Subgraph version it serves, and when it moves to the next one.