Skip to content

Subgraph Development on The Graph for Protocols, Chains and App Teams

Protofire writes subgraphs on The Graph around the queries of protocols, chains and app teams. Your own wallet or Safe publishes them, and we move existing subgraphs off Subgraph Studio staging. Protofire has built subgraphs since 2019 and was a top-3 Graph indexer by indexing rewards, 2020 to 2024.

Luis Medeiros

Reviewed by Luis Medeiros, Field CTO at ProtofireLast reviewed: November 2026

On this page
  1. Overview
  2. Why it matters
  3. Why Protofire
  4. What you get
  5. How the work goes
  6. How work starts
  7. Not the right fit
  8. Related guides and services
  9. FAQ

Work shipped for 60+ networks and 95+ protocols, including

  • Chainlink
  • Ethereum
  • Solana
  • Safe
  • Ripple
  • Aave

What subgraph development on The Graph settles in advance

Subgraph development on The Graph settles in advance where the subgraph runs, which wallet owns it and which handler can stop it. For example, your app's pages load their data from a subgraph on Subgraph Studio's staging endpoint. What do those pages show on the day that endpoint stops answering for your chain?

Protofire writes and tests your subgraph and prepares each publish for your wallet or Safe to sign. We also move existing subgraphs to a host that still answers.

Who builds, serves and owns each part of a subgraph

Protofire builds the manifest, mappings and release checks. Indexers serve the queries, and your team holds the NFT and the keys.

Your team

Your contracts

Your contracts emit transfers, swaps and votes on a supported network.

Your app and your keys

The app queries a pinned Deployment ID. Your wallet or Safe holds the Subgraph NFT, and your CI holds the deploy key.
Protofire builds

Manifest, schema and mappings

The manifest (subgraph.yaml), the schema (schema.graphql) and the AssemblyScript handlers are kept in your repository and tested on mock events.

Release and checks

Your CI runs graph deploy. Then a _meta query returns the Deployment ID, the last indexed block and whether the subgraph has indexing errors.
The Graph and its Indexers

Graph Node

Indexers on The Graph Network, or another host, index the subgraph.

Subgraph Gateway

The Gateway routes each query to an Indexer and bills the query to the API key.

Three risks to a subgraph: its host, its code and its owner

Subgraph Studio's staging endpoint is closing chain by chain, so a subgraph that ran on staging alone has to move.Staging queries ended on BNB Smart Chain and Polygon on 8 October 2026. The Graph said in its October 2026 review that support for other chains winds down in turn. By 27 October, fewer than 78 of the original 860+ subgraphs on those two chains remained in Studio, according to the same review. For a subgraph already published and queried on The Graph Network, nothing changes.

Subgraph hosts have closed before. The Graph's own hosted service was no longer active as of 12 June 2024. Alchemy Subgraphs "was sunset on December 8, 2025", according to Alchemy's deprecation notice.

The subgraph's own code is a second risk. By default, one handler that fails on one event stops a published subgraph at that block. The Graph's documentation tells developers not to deploy the setting that would let the subgraph continue.

Ownership is the third risk. The Graph mints an ERC-721 NFT to the publishing address, and its documentation on transfers says "Whoever owns the NFT controls the Subgraph". So a subgraph published from a developer's personal wallet belongs to that developer until someone transfers it.

Indexing errors on already synced Subgraphs will, by default, cause the Subgraph to fail and stop syncing.
The Graph, Documentation, Advanced Subgraph Features · The Graph documentation, read November 2026

Our subgraph record: Tally, The Graph Foundation and our repositories

20+
open-source subgraphs on our GitHub
2019
the year we began building subgraphs

A Tally engineer, The Graph Foundation and a post in The Graph's forum each name Protofire for subgraph work.These records date from 2021. The grant and the indexer are past work.

A Tally engineer built a testing framework around our subgraph

On 19 February 2021 a Tally engineer posted a subgraph testing framework on The Graph's forum. He built it "around Protofire's Compound Governor Alpha Subgraph" and called that subgraph "darn good and public".

The Graph Foundation funded our subgraph work

On 13 July 2021 The Graph Foundation's second grant wave listed "Subgraph Development & Support - Protofire". That grant is past.

The Graph's forum introduced Protofire as an indexer

Protofire was a top-3 Graph indexer by indexing rewards, 2020 to 2024. On 1 September 2021 a post in The Graph forum's Know Your Indexer series introduced the Protofire team. That indexer is past work.

Open-source subgraphs we wrote and published

Protofire has built subgraphs on The Graph since 2019, and 20+ of them are open source on our GitHub. They include subgraphs for the contracts of Maker, Curve, Compound governance, UMA, dYdX and Kyber. Those six repositories were last updated between 2020 and 2022, and five of them were archived on 1 September 2026. We published the Subgraph Toolkit on npm. Our case study on the 20+ subgraphs and the Subgraph Toolkit lists the repositories.

What subgraph development with Protofire delivers

A schema written around your app's queries

Queries return the records your app needs, in place of chain events that the app would have to scan. Protofire writes the schema around the queries your app runs. We write AssemblyScript event handlers with immutable entities and Bytes IDs. We also write Matchstick tests that include reverted calls, and a graph deploy job in your CI.

Your wallet or Safe owns the published subgraph

Your wallet or Safe signs the publish, so The Graph mints the NFT that controls the subgraph to your address. Protofire prepares the publish. Studio's deploy key is stored in your CI secrets, where your pipeline can read it and our engineers cannot. Each API key in your Studio account has allowed domains, allowed subgraphs and a monthly spending limit. We set them with you before the key goes into production. After launch, Protofire holds no Subgraph NFT, owner wallet or Studio account.

Moving queries off Subgraph Studio staging

Your app moves to a Gateway URL that is pinned to one Deployment ID. Protofire audits the manifest against the network's limits and replaces the handlers that the network cannot serve. We set up billing and an API key in your Studio account. While staging still answers, we run your queries against both endpoints and compare the entities and the last indexed block. Where another host supports it, a move to that host redeploys the same build from its IPFS hash.

Repairing a subgraph that stopped syncing

Protofire diagnoses the failure from the indexing logs and fixes the mappings. Where The Graph's guide allows one, we ship a grafted hotfix. Then we prepare a republish without grafting for your wallet or Safe to sign. We also measure sync and query timings on your own queries before and after the repair.

Subgraphs for a chain's core contracts

Your chain's ecosystem gets subgraphs for the chain's bridge, token and DEX contracts, published under the chain's own address. The ecosystem can query and fork these subgraphs. Protofire works through The Graph's chain integration with the chain's JSON-RPC, Firehose or Substreams endpoints. We also write down a fallback in case the chain leaves Studio.

A Graph Node for a chain or a private index

A chain with no place on The Graph Network can keep its data on a Graph Node in its own cloud account. An app that needs a private index can do the same. Protofire can run the Graph Node under a written scope that covers upgrades, sync alerts and the indexing status endpoint. Our host access gives us no role on your Subgraph NFT, Studio account or wallets, and the access ends with the scope. You keep the cloud account, the configuration, the RPC contracts and the data.

How Protofire builds and releases a subgraph

  1. Step 1

    Checking the manifest against what the chain can serve

    Call handlers depend on the Parity tracing API, which BNB chain and Arbitrum do not offer. The Graph's manifest documentation says a subgraph with a call handler on those chains "will not start syncing". Protofire writes to events wherever the contract emits them. We wrap each contract call that can revert in its try_ method. An eth_call inside a mapping needs an archive node, so we confirm archive and trace endpoints first. Pruning is set to match the history your queries read.
  2. Step 2

    Tests run on mock events, then on real history

    Matchstick tests run each handler on mock events, including reverted calls. Then graph deploy syncs the build in Subgraph Studio. Protofire compares the first synced entities with the contract's own logs.
  3. Step 3

    Your wallet or Safe signs the publish

    Your wallet or Safe signs the publish of the subgraph to The Graph Network on Arbitrum One. Curation signal draws Indexers to a subgraph. Protofire agrees the amount of curation signal with you.
  4. Step 4

    A _meta query confirms the release

    Before the app switches, Protofire queries _meta for the deployment, the last indexed block number and hash, and hasIndexingErrors (The Graph). The switch waits until the deployment equals the pinned ID, hasIndexingErrors is false, and the block number and hash match the chain.
  5. Step 5

    The app queries one pinned version

    Your app pins the Deployment ID, which is the IPFS hash of one compiled manifest. The pin matters because a Subgraph ID follows each new version and can answer from an older one while the new one syncs (The Graph). Alerts on hasIndexingErrors and on the _meta block lag are sent to your on-call team.

How a subgraph project with Protofire starts

You send the contract addresses, the ABIs and the five queries your app runs most.For a migration, you also send the current Deployment ID. Protofire's first written proposal names where the subgraph runs: The Graph Network, another host or a Graph Node in your own cloud account. Commercial terms are on how we work.

Proposal
In writing, one business day after the discovery call: findings, a plan in phases and the first step we recommend.
Price
Fixed per phase when you commission it, against written acceptance criteria. Overruns inside them are ours to absorb, invoices follow delivered milestones, and you can stop at any phase boundary. Anything we operate after launch is priced in the proposal as its own recurring line, with the notice to end it.
Ownership
Code we write for you, contracts, the keys and credentials this work creates and the accounts your infrastructure runs in are yours by contract, within the license of any third-party software involved. Keys that a custody platform or a staking provider holds under its own key model stay with it under your contract; every other custody key stays with you or the custodian you appoint. Where the scope places something on servers we rent, it says what moves to you and when. An NDA is available from your first message, and we sign a data processing agreement (DPA) together with it.
After launch
Delivery closes with a hypercare window and a defect warranty, with their terms written into the proposal. A service we operate continues under its written scope until that scope ends.
Access
Read-only by default. A role that can start requests only if your written scope names one; never a signer, approver, administrator, key holder or recovery role on your contracts, wallets or custody platform. Services we build call each platform on credentials your staff issue and keep in your vault. Anything that approves or moves funds runs in your environment, and a scope under which we operate a service lists every write call it makes. Where the scope has us operate nodes, validators, monitors, explorers or indexers, it names the role and any key we hold on those servers, and in your own cloud account you can remove it.
Licenses
Protofire is an engineering firm and holds no financial or crypto-asset license; licensed activity stays with you and your providers.

How we work shows a worked proposal.

When a custom subgraph from Protofire does not fit

A ready-made option serves some teams better than a custom subgraph.

  • Your contract is standard and your chain is supported. The Graph's Quick Start goes from Subgraph Studio to a query URL. A change of host alone can be a redeploy where the new host deploys from an IPFS hash.
  • You need standard token balances, transfers or prices. Data vendors sell those ready-made.
  • Your pipeline is streaming, high-frequency or non-EVM, or an exchange needs deposit crediting. Our blockchain data indexing page covers the choice among Subgraphs, Substreams, Ponder and custom indexers.
  • Your chain's RPC lacks archive state or tracing. In that case, archive and trace endpoints come first.

Protofire does not buy or sell GRT for you, or advise on GRT as an investment.

Open source we’ve shipped

The Protofire repositories behind this page.

Part of 190+ open-source repositories from Protofire

FAQ

What is subgraph development?
Subgraph development is writing the manifest, the AssemblyScript mappings and the GraphQL schema for a subgraph on The Graph. Together they turn a smart contract's events into an API that an app can query. Protofire writes and tests them around the queries your app runs. We prepare each publish for your wallet or Safe to sign, and we move existing subgraphs between hosts.
Who can build subgraphs for a protocol, a chain or an app?
Protofire builds subgraphs for three kinds of team. A protocol gets subgraphs for its contracts, shaped around the queries of its front end. A chain gets subgraphs for its bridge, token and DEX contracts, published from the chain's own Safe. An app team that already has a subgraph gets a repair or a move to a host that still answers.
Is The Graph still a sound place to build a subgraph?
Yes for a published subgraph, with a fallback written down. Studio staging is ending, and Graph Node development is moving to InfraDAO and is "in a stabilization phase". But The Graph's October 2026 review says nothing changes for a subgraph already published and queried on the network. A published build can also run on a host that deploys from its IPFS hash, or on a self-run Graph Node. Protofire's proposal names the fallback for your chain.
What does querying a subgraph cost on The Graph?
Each API key on The Graph gets a free monthly allowance of queries. Further queries are paid in GRT or by credit card (The Graph). Curation signal is the other cost, and Protofire agrees its amount with you. A monthly spending limit, set on the API key before the key goes live, caps what a leaked key can bill.
Can a subgraph move to a different host?
Yes. Goldsky's documentation describes a drop-in migration of a published subgraph from its IPFS hash, which is the Deployment ID. The mappings and the schema do not change. The work is in the app, which needs a new endpoint and key. Both endpoints are then checked side by side before the switch.
How do we keep subgraph data correct through reorgs?
A consumer of the subgraph requests _meta with each read and stores the returned block number and block hash. The consumer then uses the block argument to keep all pages of one result on that block. Results above the finalized height are provisional, because a result for a block "not yet considered final" can shift under a concurrent reorg (The Graph). A holder or supply report queries at a height the chain has finalized. The report stores that block's hash and names the height as its cut-off.
Should we write a subgraph or build our own indexer?
Protofire builds a subgraph when your app needs GraphQL over state derived from events. The Graph recommends a subgraph for the vast majority of small-to-medium applications (The Graph). Streaming, high-throughput or non-EVM workloads point to Substreams or a custom indexer. Our blockchain data indexing page covers those options.

Get a proposal

Tell us what you are building. An engineer reads it, we have a short call, and the written proposal follows within one business day.

Luis MedeirosField CTO, reads every request · LinkedIn

A demo or repository link also works.