Pick the service that returns the data your application needs in the shape it can use, with the least state for you to maintain. Start from the job, check what each service leaves to you, then run that service's quickstart.
Match your need to a service
RPC
- Read contract state or balances nowIt exposes native EVM node methods without an indexing layer.
- Submit transactionsTransaction submission is part of the JSON-RPC interface.
Subgraphs
- Query an existing entity schema through GraphQLQuery indexed entities without building the indexing pipeline yourself.
Substreams
- Process every block or event in orderIt streams deterministic package output with cursors and undo signals.
- Backfill a stream into your own databaseYour consumer can replay ranges and materialize the result it needs.
What GraphOps runs and what you own
How the services differ
| Concern | RPC | Subgraphs | Substreams |
|---|---|---|---|
| Interface | EVM JSON-RPC over HTTPS and WebSocket. | GraphQL over HTTPS. | gRPC streams with cursors. |
| Data shape | Node request and response objects. | GraphQL entities defined by a Subgraph schema. | Block-scoped module output. |
| Freshness | Chain head and explicit block references. | Subgraph indexing progress. | Selected start and stop blocks and finality mode. |
| Long-running state | Your application polls or subscribes. | GraphOps keeps the indexed Subgraph view. | Your consumer materializes state. |
| Recovery | Retry against an explicit block reference. | Inspect _meta and indexing status. | Resume from a committed cursor and process undo signals. |
Subgraphs or Substreams
Both give you indexed onchain data, but they leave different work to you. Choose
Subgraphs when your application queries entities over GraphQL and you want
GraphOps to keep the indexed view; you check its freshness with _meta. Choose
Substreams when your consumer must process every relevant block in order and
store the result in your own database; you persist the cursor and handle undo signals.
Combine services
One product often uses more than one service. One API key can include every service your application uses, and all of them draw from your organization's credit balance.
- Wallet or dapp: Subgraphs for read-heavy views such as balances and history, and RPC to submit transactions and read the latest contract state.
- Analytics backend: Substreams to backfill and stream events into your database, and RPC for occasional point reads at a specific block.
- Trading or monitoring bot: RPC WebSocket subscriptions for new blocks and logs, with a Subgraph for indexed context.
When a workload could fit more than one service, start with the smallest interface that completes the job: RPC for direct node calls, Subgraphs for an existing GraphQL entity model, and Substreams when you need an ordered data pipeline. If you are still unsure, ask GraphOps support(opens in a new tab) with a short description of the workload.
Discover the APIs from code
Tools and agents can read the API catalog(opens in a new tab), a
standard RFC 9727(opens in a new tab) list of each service's endpoint,
machine-readable description, and documentation. RPC and Subgraphs each serve an OpenAPI document
at /openapi.json on their endpoint origin, such as https://rpc.graphops.xyz/openapi.json.
Substreams links the gRPC service definitions of the
API versions it serves.
Next steps
Last updated