Skip to content

feat: allow orphaned deployments to be queried#1199

Open
tmigone wants to merge 1 commit into
mainfrom
tmigone/orphaned-deployments
Open

feat: allow orphaned deployments to be queried#1199
tmigone wants to merge 1 commit into
mainfrom
tmigone/orphaned-deployments

Conversation

@tmigone
Copy link
Copy Markdown
Member

@tmigone tmigone commented May 29, 2026

Changes

This PR adds support for querying orphaned deployments, deployments that have active indexer allocations but are not linked to any active subgraph (activeSubgraphCount: 0). Previously, the gateway discovered deployments exclusively through active subgraphs. This meant orphaned deployments were invisible to the gateway and returned error even when indexers were actively indexing and serving them.

A few notes on the implementation:

  • The network subgraph query is extended with a parallel orphanedDeployments subquery that fetches deployments where activeSubgraphCount: 0 and allocations have status: Active.
  • Both subqueries use independent pagination cursors and run together until both complete.
  • Results are merged into the network snapshot during pre-processing, with subgraph-linked deployments taking precedence over orphaned ones.
  • Restricted API keys cannot query orphaned deployments as the enforcement happens at the subgraph level.

Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
@tmigone tmigone requested a review from Theodus May 29, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant