Overview
Multi-network support allows you to:- Index the same contract deployed across different networks
- Aggregate data from multiple chains in a single subgraph
- Run one Graph Node instance serving multiple networks
- Scale across networks with different sharding strategies
Configuration
Basic Multi-Network Setup
Configure multiple chains in your Graph Node configuration file:Chain Configuration Options
String
required
Specifies which database shard stores this chain’s data. Must reference a shard defined in
[store].String
default:"ethereum"
The protocol type being indexed. Options:
ethereum, near, cosmos, arweave, starknet.Number
default:"500"
The polling interval for the block ingestor in milliseconds.
String
The network name used by AMP for this chain. Set this when AMP uses a different name than graph-node.Example:
amp = "ethereum-mainnet" on a chain named mainnet.Provider[]
required
A list of providers for that chain. See Provider Configuration.
Provider Configuration
String
required
The name of the provider, which will appear in logs.
String
required
The URL for the provider (RPC, WebSocket, or IPC endpoint).
String[]
default:"[]"
Array of features that the provider supports:
archive: Provider is an archive node with full historical statetraces: Provider supportsdebug_traceBlockByNumberfor call tracingno_eip1898: Provider doesn’t support EIP-1898no_eip2718: Provider doesn’t return thetypefield in transaction receiptscompression/gzip,compression/brotli,compression/deflate: Provider supports request compression
Object
HTTP headers to be added on every request.Example:
headers = { Authorization = "Bearer token" }Number
The maximum number of subgraphs that can use this provider. Defaults to unlimited.
String
default:"rpc"
Transport type. Options:
rpc, ws, ipc.Subgraph Manifest for Multiple Networks
Single Network Deployment
Multi-Network Deployment
You can create separate manifests for each network:- Mainnet
- Polygon
- Arbitrum
subgraph-mainnet.yaml
Using Mustache Templates
Use templating to manage network-specific values:Database Sharding for Multiple Networks
For large-scale deployments, distribute networks across multiple database shards:Running Graph Node with Configuration
When using a configuration file, you cannot use the command-line options
--postgres-url, --postgres-secondary-hosts, or --postgres-host-weights.Provider Management
Multiple Providers per Network
Configure redundant providers for reliability:Provider Limits
Control how many subgraphs can use each provider:Network-Specific Mappings
Handle network-specific logic in your mappings:Monitoring Multiple Networks
Query indexing status across all networks:Best Practices
- Configuration
- Performance
- Reliability
- Maintenance
- Separate shards by network load - Put high-volume networks on dedicated shards
- Use multiple providers - Configure redundant RPC endpoints for each network
- Set appropriate pool sizes - Allocate connection pools based on expected load
- Use deployment rules - Route subgraphs to appropriate nodes and shards
- Name chains consistently - Use standard network names that match graph-cli
Environment Variables for Multi-Network
Key environment variables when running multiple networks:Number
default:"250"
Maximum expected reorg size. May need to be set differently per network.
Number
default:"500"
Polling interval in milliseconds. Consider network block times.
Number
default:"1000"
Maximum blocks to scan per request. Adjust based on network throughput.
Number
default:"100"
Target triggers per batch. Optimize based on event density.
Troubleshooting
- Network Not Found
- Provider Issues
- Sync Delays
- Deployment Routing
Problem: Error says network is not configuredSolutions:
- Verify network name in subgraph.yaml matches config.toml
- Check that the chain section exists:
[chains.network-name] - Ensure Graph Node was restarted after config changes
- Validate config file:
graph-node --config config.toml config check
Next Steps
- Review the subgraph manifest specification
- Learn about deploying subgraphs
- Explore advanced configuration
- Set up database sharding

