Subgraphs API
Read your subgraph's tables, describe them, and deploy and operate them. Reading is under /v1/subgraphs; deploying and operating is the write plane under /api/subgraphs on a self-hosted instance. Envelope and filters are in REST conventions.
List a table's rows
GET/v1/subgraphs/{name}/{table}Rows from one subgraph table, keyset-paginated. By default pages walk _id; _sort walks one column instead, with _id as the tiebreaker. next_cursor is set on every page that returned rows and is null only on an empty page: pass it back as cursor to continue, or tail new rows with cursor = next_cursor ?? cursor. _offset is refused (400): deep OFFSET scans hurt on big tables. _limit defaults to 50.
Path parameters
Filters
Case-insensitive contains match across every column marked search: true in the definition, ORed. 400 on a table with no searchable column.
Column filters, one query param each, ANDed. Any table column or system column (_id, _block_height, _tx_id, _created_at) works. col=value is equality; col.op=value applies an operator, one of gte, lte, gt, lt, neq, like, in, notIn. like is a case-insensitive contains match. in and notIn take a comma-separated list. An unknown column is 400 INVALID_COLUMN; an unknown operator, or the misplaced form col=op.value, is 400 VALIDATION_ERROR. Bare limit, offset, sort, order, fields and search are 400: control params take a leading underscore.
Range and paging
Page size, 1 to 1000. A non-integer, 0, a negative, or anything over 1000 is 400, not clamped.
The previous page's next_cursor, verbatim. Opaque: its shape depends on _sort, so never build one. A cursor issued under one _sort/_order is 400 under another.
One column to sort by. A comma list and jsonb columns are 400. Omit to page by _id.
Direction of the _sort column, or of _id without _sort. Anything but asc or desc is 400.
2 possible values
ascdescComma-separated columns to return. An unknown name is 400 INVALID_COLUMN. The cursor still works: _id and the _sort column are read for it and dropped from rows you did not ask them for.
Returns
The Subgraph rows page object.
- 200One page of rows
- 400A parameter, filter, cursor or body field was refused;
codesays which - 401This bind requires the instance token, and it was missing or wrong
- 404No readable subgraph by that name (
SUBGRAPH_NOT_FOUND), or it has no such table (TABLE_NOT_FOUND) - 429Hosted only: rate limited; retry after
Retry-Afterseconds. Self-hosted reads are not rate limited
Count a table's rows
GET/v1/subgraphs/{name}/{table}/countHow many rows match the filters. Takes the same column filters and _search as the row list.
Path parameters
Query parameters
exact runs COUNT(*). estimate reads the planner's row estimate instead, with no table scan, but only when there are no filters and no _search; otherwise it counts exactly. The estimate can be -1 before the table's first ANALYZE.
2 possible values
exactestimateCase-insensitive contains match across every column marked search: true in the definition, ORed. 400 on a table with no searchable column.
Column filters, one query param each, ANDed. Any table column or system column (_id, _block_height, _tx_id, _created_at) works. col=value is equality; col.op=value applies an operator, one of gte, lte, gt, lt, neq, like, in, notIn. like is a case-insensitive contains match. in and notIn take a comma-separated list. An unknown column is 400 INVALID_COLUMN; an unknown operator, or the misplaced form col=op.value, is 400 VALIDATION_ERROR. Bare limit, offset, sort, order, fields and search are 400: control params take a leading underscore.
Returns
The Subgraph row count object.
- 200The count
- 400A parameter, filter, cursor or body field was refused;
codesays which - 401This bind requires the instance token, and it was missing or wrong
- 404No readable subgraph by that name (
SUBGRAPH_NOT_FOUND), or it has no such table (TABLE_NOT_FOUND) - 429Hosted only: rate limited; retry after
Retry-Afterseconds. Self-hosted reads are not rate limited
Aggregate a table's rows
GET/v1/subgraphs/{name}/{table}/aggregateScalar aggregates over the rows that match the filters: count, distinct counts, and sum, min and max of numeric columns. With no aggregate param it returns { "count": n }. Up to 32 aggregate columns per request. Takes the same column filters and _search as the row list.
Path parameters
Query parameters
Include count. Any value but false turns it on. count is also returned when no other aggregate is asked for.
Comma-separated columns to count distinct values of. Any column.
Comma-separated columns to sum. Numeric only: uint or int columns, or _block_height; others are 400 NON_NUMERIC_COLUMN.
Comma-separated numeric columns to take the minimum of.
Comma-separated numeric columns to take the maximum of.
Case-insensitive contains match across every column marked search: true in the definition, ORed. 400 on a table with no searchable column.
Column filters, one query param each, ANDed. Any table column or system column (_id, _block_height, _tx_id, _created_at) works. col=value is equality; col.op=value applies an operator, one of gte, lte, gt, lt, neq, like, in, notIn. like is a case-insensitive contains match. in and notIn take a comma-separated list. An unknown column is 400 INVALID_COLUMN; an unknown operator, or the misplaced form col=op.value, is 400 VALIDATION_ERROR. Bare limit, offset, sort, order, fields and search are 400: control params take a leading underscore.
Returns
The Subgraph aggregates object.
- 200The aggregates
- 400A column or filter was refused:
INVALID_COLUMN,NON_NUMERIC_COLUMN,TOO_MANY_AGGREGATES, orVALIDATION_ERROR - 401This bind requires the instance token, and it was missing or wrong
- 404No readable subgraph by that name (
SUBGRAPH_NOT_FOUND), or it has no such table (TABLE_NOT_FOUND) - 429Hosted only: rate limited; retry after
Retry-Afterseconds. Self-hosted reads are not rate limited
Stream a table's new rows over SSE
GET/v1/subgraphs/{name}/{table}/streamServer-Sent Events of rows as they are indexed. Starts at the table's newest row and sends only rows after it; since replays from a block height first, then keeps tailing. The server polls every 1.5 seconds, sends each matching row in _id order, and sends a ping event after 20 idle seconds. Column filters and _search apply; _limit, _sort, _order and _fields are checked but have no effect, and rows always come back whole. Nothing is stored between connections, and Last-Event-ID is not read: to resume, reconnect with since.
Path parameters
Query parameters
Block height to replay from: rows with _block_height at or above it, then the live tail. A value that is not a number is ignored. With nothing at or above it yet, the stream tails live.
Case-insensitive contains match across every column marked search: true in the definition, ORed. 400 on a table with no searchable column.
Column filters, one query param each, ANDed. Any table column or system column (_id, _block_height, _tx_id, _created_at) works. col=value is equality; col.op=value applies an operator, one of gte, lte, gt, lt, neq, like, in, notIn. like is a case-insensitive contains match. in and notIn take a comma-separated list. An unknown column is 400 INVALID_COLUMN; an unknown operator, or the misplaced form col=op.value, is 400 VALIDATION_ERROR. Bare limit, offset, sort, order, fields and search are 400: control params take a leading underscore.
Returns
text/event-stream
- 200An open event stream. Each row arrives as one message:
idis the row's_id,datais the row as JSON, in the same shape as the row list. Idle keepalives areevent: pingwith empty data. - 400A parameter, filter, cursor or body field was refused;
codesays which - 401This bind requires the instance token, and it was missing or wrong
- 404No readable subgraph by that name (
SUBGRAPH_NOT_FOUND), or it has no such table (TABLE_NOT_FOUND) - 429Hosted only: rate limited; retry after
Retry-Afterseconds. Self-hosted reads are not rate limited
Get one row by id
GET/v1/subgraphs/{name}/{table}/{id}One row by its _id, wrapped as { data }. An id that isn't an integer, or no row with it, is a 404.
Path parameters
Returns
- 200The row.
- 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph, table, or row with that name or id (
SUBGRAPH_NOT_FOUND,TABLE_NOT_FOUND,ROW_NOT_FOUND) - 429Hosted only: rate limited; retry after
Retry-Afterseconds. Self-hosted reads are not rate limited
List the subgraphs this instance serves
GET/v1/subgraphsEvery subgraph deployed on this instance, with its tables, sync position, and approximate row count. Hosted: your account's subgraphs, then every public one. The anonymous list is cached for 30 seconds and carries an ETag; send If-None-Match for a 304.
Returns
The Subgraph directory object.
- 200The subgraph directory
- 304Anonymous request whose
If-None-Matchmatches the currentETag; no body - 401This bind requires the instance token, and it was missing or wrong
- 429Hosted only: rate limited; retry after
Retry-Afterseconds. Self-hosted reads are not rate limited
Get one subgraph's tables, columns, and sync tip
GET/v1/subgraphs/{name}Metadata for one subgraph: each table's read endpoint and declared columns, how far indexing has reached, and links to its generated docs. columns lists only the definition's columns; the system columns _id, _block_height, _tx_id and _created_at exist on every table too.
Path parameters
Subgraph name, as deployed (the name in its definition).
Returns
- 200Subgraph metadata
- 401This bind requires the instance token, and it was missing or wrong
- 404No readable subgraph by that name (
SUBGRAPH_NOT_FOUND). Hosted: another account's private subgraph reads as missing - 429Hosted only: rate limited; retry after
Retry-Afterseconds. Self-hosted reads are not rate limited
Get a subgraph's OpenAPI document
GET/v1/subgraphs/{name}/openapi.jsonAn OpenAPI 3.1 document generated from the subgraph's definition: one list path and one count path per table, a row schema per table, and the column filters each table accepts. Feed it to a client generator.
Path parameters
Subgraph name, as deployed (the name in its definition).
Query parameters
Base URL written into the document's endpoints and examples. Defaults to this request's origin, honoring X-Forwarded-Proto.
Returns
The Subgraph OpenAPI document object.
- 200The generated OpenAPI document
- 401This bind requires the instance token, and it was missing or wrong
- 404No readable subgraph by that name (
SUBGRAPH_NOT_FOUND). Hosted: another account's private subgraph reads as missing - 429Hosted only: rate limited; retry after
Retry-Afterseconds. Self-hosted reads are not rate limited
Get a subgraph's agent schema
GET/v1/subgraphs/{name}/schema.jsonA compact JSON description of the subgraph for agents and tools: per table, its endpoints, exact row count, columns, the query params and filters it accepts, and example requests.
Path parameters
Subgraph name, as deployed (the name in its definition).
Query parameters
Base URL written into the document's endpoints and examples. Defaults to this request's origin, honoring X-Forwarded-Proto.
Returns
The Subgraph agent schema object.
- 200The generated agent schema
- 401This bind requires the instance token, and it was missing or wrong
- 404No readable subgraph by that name (
SUBGRAPH_NOT_FOUND). Hosted: another account's private subgraph reads as missing - 429Hosted only: rate limited; retry after
Retry-Afterseconds. Self-hosted reads are not rate limited
Get a subgraph's markdown docs
GET/v1/subgraphs/{name}/docs.mdThe agent schema rendered as markdown: a section per table with its endpoints, row count, column table, query params, filters, and a curl example. Served as text/markdown.
Path parameters
Subgraph name, as deployed (the name in its definition).
Query parameters
Base URL written into the document's endpoints and examples. Defaults to this request's origin, honoring X-Forwarded-Proto.
Returns
text/markdown
- 200The generated markdown
- 401This bind requires the instance token, and it was missing or wrong
- 404No readable subgraph by that name (
SUBGRAPH_NOT_FOUND). Hosted: another account's private subgraph reads as missing - 429Hosted only: rate limited; retry after
Retry-Afterseconds. Self-hosted reads are not rate limited
List deployed subgraphs
GET/api/subgraphsSelf-hosted instancesEvery subgraph on this instance with its status, sync progress, row count and open gap count. Row counts come from Postgres table statistics, so they are approximate; the detail read counts exactly.
Query parameters
Also return each subgraph's hourly health for this many hours, the same shape as the health read. 1 to 168.
Returns
A cursor envelope. data holds Deployed subgraph objects.
- 200Every deployed subgraph, unpaginated
- 401This bind requires the instance token, and it was missing or wrong
Deploy or redeploy a subgraph
POST/api/subgraphsSelf-hosted instancesTakes bundled handler code (see /api/subgraphs/bundle) plus the schema and sources extracted from it. The server reads the definition from the bundle without running it, validates it, lints print fields, then applies the schema. A new subgraph, or a breaking schema change, queues a reindex and returns its operationId. Redeploying the same name updates in place; action says what happened. With dryRun it returns the DDL plan and writes nothing.
Body
Subgraph name. Lowercase letters, digits and hyphens. Deploying an existing name updates it.
Event sources keyed by name, as read from the handler module. At least one.
Table definitions keyed by table name.
The bundled handler module. 1 MB max.
Overrides the definition's startBlock for this deploy and forces a reindex from it. Refused past the chain tip (START_BLOCK_PAST_TIP).
One line on what the subgraph indexes.
The unbundled TypeScript source, kept so secondlayer subgraphs source can return it. 1 MB max.
Validate and return the DDL plan without writing anything.
Returns
- 200Redeployed in place (
actionis anything butcreated), or the dry-run plan whendryRunis set - 201Created. A reindex from
start_blockis queued; polloperationId - 400The body failed validation (here
erroris an object of field errors, not a string), the bundle could not be read (HANDLER_IMPORT_FAILED), the definition is invalid, orstartBlockis past the chain tip (START_BLOCK_PAST_TIP) - 401This bind requires the instance token, and it was missing or wrong
- 409A reindex or backfill is already queued or running for this subgraph (
OPERATION_IN_PROGRESS). Wait for it, or stop it first. - 415Missing or non-JSON
Content-Type(UNSUPPORTED_MEDIA_TYPE) — writes must sendContent-Type: application/json - 422The definition deploys but would index wrong: a declared print field is never seen on-chain (
PRINT_FIELD_MISMATCH), handlers write 0 rows against observed prints (EMPTY_MAPPING), a tip-first deploy has delta handlers (TIP_FIRST_NON_REPLAYABLE_HANDLER) or a breaking schema change (TIP_FIRST_BREAKING_CHANGE), or a subgraph with provable sources has a nondeterministic handler (NONDETERMINISTIC_HANDLER, withverification.reasonsnaming each use)
Bundle subgraph source into deployable handler code
POST/api/subgraphs/bundleSelf-hosted instancesCompiles a TypeScript subgraph module on the server and returns the bundle plus the metadata read from it, ready to POST to /api/subgraphs. Deploys nothing. The CLI and MCP bundle locally; this is for callers that cannot run esbuild.
Body
The subgraph module's TypeScript source, with defineSubgraph as the default export.
Returns
- 200Bundled
- 400
codeis missing or empty, or the module did not compile (BUNDLE_FAILED) - 401This bind requires the instance token, and it was missing or wrong
- 413The bundle exceeds the size limit (
BUNDLE_TOO_LARGE);actualBytesandmaxBytessay by how much - 415Missing or non-JSON
Content-Type(UNSUPPORTED_MEDIA_TYPE) — writes must sendContent-Type: application/json
Get a deployed subgraph
GET/api/subgraphs/{name}Self-hosted instancesDefinition, health, sync progress and per-table columns and exact row counts. While a reindex or backfill is active, sync carries its queue position, event progress and ETA.
Path parameters
Subgraph name, as deployed. Lowercase letters, digits and hyphens.
Returns
The Deployed subgraph detail object.
- 200The subgraph
- 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name on this instance (
SUBGRAPH_NOT_FOUND)
Delete a subgraph
DELETE/api/subgraphs/{name}Self-hosted instancesRequests cancellation of any queued or running operation, waits up to 30 seconds for the processor to release it, then drops the Postgres schema and the registry row. Irreversible.
Path parameters
Subgraph name, as deployed. Lowercase letters, digits and hyphens.
Query parameters
Accepted and logged. The delete proceeds after the 30-second wait either way.
Returns
- 200Deleted
- 400A parameter, filter, cursor or body field was refused;
codesays which - 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name on this instance (
SUBGRAPH_NOT_FOUND) - 415Missing or non-JSON
Content-Type(UNSUPPORTED_MEDIA_TYPE) — writes must sendContent-Type: application/json
Queue a full reindex
POST/api/subgraphs/{name}/reindexSelf-hosted instancesDrops the subgraph's tables and rebuilds them from its start block to the chain tip. Takes no body. A fromBlock/toBlock is refused with 400 REINDEX_RANGE_NOT_SUPPORTED rather than ignored, since a ranged walk would destroy everything outside the range; use backfill for a range. Poll the returned operationId.
Path parameters
Subgraph name, as deployed. Lowercase letters, digits and hyphens.
Returns
- 200Reindex queued
- 400The body carried
fromBlockortoBlock(REINDEX_RANGE_NOT_SUPPORTED) - 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name on this instance (
SUBGRAPH_NOT_FOUND) - 409A reindex or backfill is already queued or running for this subgraph (
OPERATION_IN_PROGRESS). Wait for it, or stop it first. - 415Missing or non-JSON
Content-Type(UNSUPPORTED_MEDIA_TYPE) — writes must sendContent-Type: application/json
Queue a backfill over a block range
POST/api/subgraphs/{name}/backfillSelf-hosted instancesRe-runs handlers over fromBlock to toBlock, inclusive, without dropping data. A backfill that overlaps an earlier failed or cancelled one resumes from its last committed block. Refused when the handlers apply deltas (ctx.increment, ctx.update) or read-modify-write rows (ctx.findOne, ctx.findMany), which would double-count blocks already processed; reindex those instead.
Path parameters
Subgraph name, as deployed. Lowercase letters, digits and hyphens.
Body
Returns
- 200Backfill queued
- 400
fromBlockortoBlockis missing, not a number, or 0 (VALIDATION_ERROR) - 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name on this instance (
SUBGRAPH_NOT_FOUND) - 409A reindex or backfill is already queued or running for this subgraph (
OPERATION_IN_PROGRESS). Wait for it, or stop it first. - 415Missing or non-JSON
Content-Type(UNSUPPORTED_MEDIA_TYPE) — writes must sendContent-Type: application/json - 422The handlers apply deltas and cannot be replayed (
BACKFILL_NON_REPLAYABLE_HANDLER)
Stop the active reindex or backfill
POST/api/subgraphs/{name}/stopSelf-hosted instancesTakes no body. Flags the queued or running operation for cancellation; the processor stops it at its next checkpoint and marks it cancelled. A stopped backfill resumes from its checkpoint when the same range is queued again.
Path parameters
Subgraph name, as deployed. Lowercase letters, digits and hyphens.
Returns
- 200Stop requested
- 400A parameter, filter, cursor or body field was refused;
codesays which - 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name (
SUBGRAPH_NOT_FOUND), or nothing queued or running to stop (NO_OPERATION) - 415Missing or non-JSON
Content-Type(UNSUPPORTED_MEDIA_TYPE) — writes must sendContent-Type: application/json
List a subgraph's operations
GET/api/subgraphs/{name}/operationsSelf-hosted instancesThe 20 most recent reindex and backfill operations, newest first, with progress. Queued ones carry an approximate queuePosition.
Path parameters
Subgraph name, as deployed. Lowercase letters, digits and hyphens.
Returns
A cursor envelope. operations holds Subgraph operation objects.
- 200Recent operations
- 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name on this instance (
SUBGRAPH_NOT_FOUND)
Get an operation
GET/api/subgraphs/{name}/operations/{operation_id}Self-hosted instancesOne reindex or backfill by id. Poll it after a deploy, reindex or backfill until status is completed, failed or cancelled.
Path parameters
Returns
The Subgraph operation object.
- 200The operation
- 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name (
SUBGRAPH_NOT_FOUND), or no operation with this id on it (OPERATION_NOT_FOUND)
List a subgraph's gaps
GET/api/subgraphs/{name}/gapsSelf-hosted instancesBlock ranges the subgraph failed to process, ordered by start height. Open gaps only by default.
Path parameters
Subgraph name, as deployed. Lowercase letters, digits and hyphens.
Filters
Range and paging
Page size, 1 to 1000. Default 50.
Returns
A cursor envelope. data holds Subgraph gap objects.
- 200A page of gaps
- 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name on this instance (
SUBGRAPH_NOT_FOUND)
Get a subgraph's hourly health
GET/api/subgraphs/{name}/healthSelf-hosted instancesHourly buckets from the snapshot the subgraph records every minute: blocks behind the chain tip, rows written, handler errors and events handled. Snapshots are kept 7 days. Oldest hour first; an hour with no snapshots has lagBlocks: null and zero counts.
Path parameters
Subgraph name, as deployed. Lowercase letters, digits and hyphens.
Query parameters
Hours to return, 1 to 168. Default 24.
Returns
- 200Hourly health
- 400
hoursis not an integer from 1 to 168 (VALIDATION_ERROR) - 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name on this instance (
SUBGRAPH_NOT_FOUND)
List a subgraph's handler errors
GET/api/subgraphs/{name}/errorsSelf-hosted instancesHandler errors grouped by message and stack frame, most frequent first. A bug that throws on every event is one group with a count, plus a sample transaction to reproduce it.
Path parameters
Subgraph name, as deployed. Lowercase letters, digits and hyphens.
Range and paging
Groups to return, 1 to 50. Default 20.
Returns
- 200Error groups
- 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name on this instance (
SUBGRAPH_NOT_FOUND)
List a subgraph's print violations
GET/api/subgraphs/{name}/violationsSelf-hosted instancesPrint events a handler skipped because the payload did not match the source's declared prints schema, newest first. The instance keeps the last 100 per subgraph.
Path parameters
Subgraph name, as deployed. Lowercase letters, digits and hyphens.
Range and paging
Page size, 1 to 100. Default 50.
Returns
A cursor envelope. data holds Print validation skip objects.
- 200Recent violations
- 401This bind requires the instance token, and it was missing or wrong
- 404No subgraph by this name on this instance (
SUBGRAPH_NOT_FOUND)
Returned by List the subgraphs this instance serves
Metadata for one subgraph.
Returned by Get one subgraph's tables, columns, and sync tip
Attributes
Subgraph name.
The definition's description, if it has one.
Deployed version.
Indexing state: active (following the chain), reindexing, paused, or error.
First deploy.
Contracts the definition reads from: each source's contractId, and the contract half of each assetIdentifier.
Block indexing starts from. 0 means genesis.
Each table by name.
Generated docs for this subgraph.
OpenAPI 3.1 document generated from the definition.
Returned by Get a subgraph's OpenAPI document
Attributes
Always 3.1.0.
Title, the subgraph's version, and its description.
The server param, or this request's origin.
A list path and a count path per table.
A <table>Row schema per table.
Subgraph name.
Deployed version.
sha256 of the definition's name, schema and sources. Changes only when they do.
sha256 over the schema hash, bundled handler, startBlock, network and runtime. Absent for subgraphs deployed before pins existed.
When this document was generated.
The definition's sources, as written.
Table names.
Compact description of a subgraph for agents and tools.
Returned by Get a subgraph's agent schema
Attributes
Subgraph name.
Deployed version.
The definition's description. Absent without one.
sha256 of the definition's name, schema and sources.
sha256 over the schema hash, bundled handler, startBlock, network and runtime.
When this schema was generated.
The server param, or this request's origin.
The definition's sources, as written.
Per table: absolute endpoints, exact rowCount, columns including system columns, accepted query params and filters, and example requests.
One page of rows from GET /v1/subgraphs/{name}/{table}.
Returned by List a table's rows
Attributes
The page, in _id order or _sort order.
Pass back as cursor to resume after this page. Set on every page that returned rows, including a short last page; null only on an empty page, which means you are caught up. To tail, keep the last cursor you got: cursor = next_cursor ?? cursor. Without _sort it is the last row's _id; with _sort it is an opaque token.
Returned by Count a table's rows
Attributes
Rows matching the filters, or the planner's estimate for an unfiltered _count=estimate.
Only the aggregates you asked for are present. Sums, minimums and maximums are strings so large values stay exact.
Returned by Aggregate a table's rows
Attributes
Rows matching the filters. Present with _count, or when no other aggregate was asked for.
Distinct values per _countDistinct column.
Sum per _sum column. "0" over no rows.
Minimum per _min column. null over no rows.
Maximum per _max column. null over no rows.
One deployed subgraph, as the list returns it.
Returned by List deployed subgraphs
Attributes
Subgraph name.
Deployed version.
Highest block processed.
Events handled since deploy.
Approximate rows across tables, from table statistics.
Handler errors since deploy.
Table names.
Progress denominator: the chain tip, or the reindex target while reindexing.
The instance's chain tip.
Height this sync or reindex is walking toward.
Fraction of blocks processed, 0 to 1.
Blocks left to targetBlock.
Open gaps.
Most recent processing error.
When it happened.
Last registry update.
First deploy.
Hourly health, present only when the list is requested with health.
A compiled subgraph. Everything but ok and bundleSize is the body for POST /api/subgraphs.
Returned by Bundle subgraph source into deployable handler code
Attributes
Name from the definition.
Description from the definition, if set.
Event sources by name.
Table definitions by name.
The bundled handler module.
The code you sent, echoed back.
Size of handlerCode in bytes.
One deployed subgraph in full.
Returned by Get a deployed subgraph
Attributes
Subgraph name.
Deployed version.
Hash of the table schema. Changes when the schema does.
Hash of everything that shapes rows: schema hash, bundled handler, startBlock, network, runtime. Null for subgraphs deployed before pins existed.
Derived verification level. Null for subgraphs deployed before levels were derived.
Highest block processed.
From the definition, when set.
Event sources by name, from the definition.
The stored definition: name, description, startBlock, sources, schema.
totalProcessed and totalErrors since deploy, errorRate, the last error and when, emptyMapping (events matched but every table is empty), and violationCount (print violations kept).
By table name: read endpoint, columns (with the system columns _id, _block_height, _tx_id, _created_at), exact rowCount, an example query, and indexes and uniqueKeys when declared.
First deploy.
Last registry update.
A reindex or backfill accepted into the queue.
Returned by Queue a full reindex, Queue a backfill over a block range
Attributes
One-line summary.
First block. For a reindex, the subgraph's start block.
Last block. For a reindex, the string "chain tip": it runs to whatever the tip is when it gets there.
Poll /api/subgraphs/{name}/operations/{operation_id}.
A reindex or backfill. One per subgraph can be queued or running at a time.
Returned by List a subgraph's operations, Get an operation
Attributes
Operation id.
Subgraph it runs on.
reindex drops and rebuilds; backfill re-runs a range in place.
2 possible values
reindexbackfillqueued until a processor claims it. completed, failed and cancelled are final.
5 possible values
queuedrunningcompletedfailedcancelledlight for contract-scoped sources, heavy for broad ones. The processor limits how many heavy operations run at once.
2 possible values
lightheavyFirst block. null on a reindex queued from /reindex, which starts at the subgraph's start block.
Last block. null means the chain tip.
Blocks covered. Set when the operation finishes.
Backfills only: last committed block. A requeued backfill resumes after it.
Events expected, computed at enqueue for contract-scoped sources.
Events processed so far.
Fraction done, 0 to 1, from events when estimated, else blocks. null before any progress is reported.
Queued only: approximate 1-based position. Show it as ~N.
Why it failed.
When a processor claimed it.
When it reached a final status.
When it was queued.
Last change.
A block range the subgraph did not process.
Returned by List a subgraph's gaps
Attributes
First missing block.
Last missing block, inclusive.
Blocks in the range.
block_missing: the block was not in the index. processing_error: a handler threw.
2 possible values
block_missingprocessing_errorWhen it was recorded.
When a later walk covered it. null while open.
Hourly health buckets and the newest 24 hours' handler errors.
Returned by Get a subgraph's hourly health
A print event skipped because its payload did not match the declared prints schema.
Returned by List a subgraph's print violations
Attributes
Violation id.
Source whose prints schema refused it.
Block of the event.
Transaction of the event.
Which field was missing or had the wrong type.
The decoded print, as topic and data.
When it was skipped.