Usage
All Graphman commands follow this pattern:Path to the Graph Node configuration file (typically
config.toml)Commands Overview
Info
Display deployment details and status
Remove
Remove a named subgraph
Unassign
Stop indexing a deployment
Drop
Delete deployment and all data
Unused Record
Record unused deployments
Unused Remove
Remove recorded unused deployments
Check Blocks
Verify cached block integrity
Call Cache Remove
Clear chain call cache
Info
Prints detailed information about a deployment, including its status, location, and indexing progress.Usage
Arguments
The deployment identifier. Can be specified as:
- Subgraph name:
author/subgraph-name - IPFS hash:
QmfWRZCjT8pri4Amey3e3mb2Bga75Vuh2fPYyNVnmPYL66 - Database namespace:
sgdNNN - IPFS hash with shard:
Qm...:shard(when the same hash is deployed in multiple shards)
Options
List only current version
List only pending versions
List only used (current and pending) versions
Include detailed status information (sync status, health, block numbers)
Output Fields
By default, the command displays:- name - The subgraph name
- status - Either
pendingorcurrent - id - The IPFS hash (Qm… identifier)
- namespace - Database schema containing deployment data tables
- shard - Database shard location
- active - Whether this is the active version for querying
- chain - Blockchain network name
- graph node id - Node ID assigned to this deployment
--status flag, additional fields are shown:
- synced - Whether the subgraph has synced to the current chain head
- health - Can be
healthy,unhealthy(syncing with errors), orfailed - latest indexed block - Most recent block processed
- current chain head block - Current blockchain head
Examples
Example Output
Example Output
Remove
Removes the association between a subgraph name and its deployment. This stops query traffic to the named subgraph and releases the name for reuse.Usage
Arguments
The name of the subgraph to remove (e.g.,
author/subgraph-name)Examples
Use Cases
- Stop serving queries for a specific subgraph name
- Release a subgraph name for another deployment
- Temporarily disable a subgraph without losing data
Unassign
Makes Graph Node stop indexing a deployment permanently. The deployment is removed from all node assignments.Usage
Arguments
The deployment identifier (see
info command for supported formats)Examples
Related Documentation
Refer to the Maintenance Documentation for more details about deployment assignment management.Unused Record
Inspects all shards for unused deployments and registers them in theunused_deployments table. This is the first step before removing unused deployment data.
No indexed data is lost. This command only records which deployments are unused.
Usage
Unused Deployment Criteria
A deployment is considered unused if it meets ALL of these criteria:- Not assigned to any node
- Either not marked as active OR is neither the current nor pending version of a subgraph
- Not the source of a currently running copy operation
Examples
Workflow
This command is typically followed byunused remove to actually delete the recorded unused deployments:
Unused Remove
Removes all indexed data from deployments previously marked as unused by theunused record command.
Usage
Options
Maximum number of unused deployments to remove (default: all)
Remove a specific deployment by its identifier
Remove only deployments recorded at least this many minutes ago
Removal Order
Deployments are removed in descending order by number of entities (smaller deployments first, larger ones last).Examples
Drop
Stops, unassigns, and deletes all indexed data from a deployment in a single operation.Usage
Arguments
The deployment identifier (name, IPFS hash, or namespace)
Options
Search only for current versions
Search only for pending versions
Search only for used (current and pending) versions
Skip confirmation prompt
What It Does
Thedrop command is equivalent to running these commands in sequence:
graphman info <search term>graphman unassign <deployment id>graphman remove <deployment name>graphman unused recordgraphman unused remove <deployment id>
Examples
Check Blocks
Compares cached blocks with fresh data from the JSON RPC provider and clears any blocks that differ. This helps diagnose and fix issues with invalid block data from RPC providers.Usage
Arguments
Chain name (must be an existing chain, see
chain list)Subcommands
- by-hash
- by-number
- by-range
Check a specific block by its hash.
The block hash (e.g.,
0xd56a9f64c7e696cfeb337791a7f4a9e81841aaf4fcad69f9bf2b2e50ad72b972)Handling Duplicates
JSON RPC providers may sometimes return different blocks for the same block number. When this happens, Graphman cannot automatically determine which is correct and will abort unless you specify--delete-duplicates, which removes all duplicated blocks before proceeding.
Examples
Call Cache Remove
Removes entries from the chain call cache. The call cache stores results of contract calls to improve indexing performance.Usage
Arguments
The name of the chain
Options
Remove the entire call cache for the chain
Remove stale contracts not accessed in this many days (based on
call_meta.accessed_at)Limit the number of contracts to consider for stale removal
Starting block number for range-based removal
Ending block number for range-based removal
Removal Strategies
Range-Based Removal
Range-Based Removal
Remove cache entries for a specific block range:If
--from is omitted, starts from the first block. If --to is omitted, continues to the last block.TTL-Based Removal
TTL-Based Removal
Remove cache entries for contracts that haven’t been accessed recently:
Complete Removal
Complete Removal
Remove the entire call cache:Use with caution: This will significantly impact indexing performance.
Examples
Best Practices
Always Use --config
Always specify the configuration file path with
--config to ensure commands operate on the correct Graph Node instance.Verify Before Dropping
Use
info command to verify deployment details before running destructive operations like drop.Two-Step Cleanup
Use
unused record followed by unused remove instead of immediately dropping deployments. This gives you time to verify.Monitor Block Cache
Regularly use
check-blocks to ensure RPC provider data integrity, especially after RPC provider changes.See Also
- Graphman GraphQL API - Manage deployments via GraphQL
- Graph Node Maintenance - Detailed maintenance procedures

