graph-node
graph-node copied to clipboard
Add json-rpc api support for dropping subgraphs
Add json-rpc method for dropping subgraphs. Using this endpoint will remove all the subgraphs for the deployment_id and will delete the underlying data. docker/bin/drop is a helper script to use the new endpoint.
Adding some sane defaults as discussed:
./docker/bin/drop Qmd3vU6y6pxxXPrvVWRZMN9soNB8AFQCEnqPa9jMSZZDEG
Dropping deployment Qmd3vU6y6pxxXPrvVWRZMN9soNB8AFQCEnqPa9jMSZZDEG
{"jsonrpc":"2.0","error":{"code":1,"message":"subgraph registrar error with store: store error: multiple subgraphs exist fo
r this hash, please remove them before trying to drop"},"id":"1"}
./docker/bin/remove y
{"jsonrpc":"2.0","result":{"type":"Null"},"id":"1"}
./docker/bin/drop Qmd3vU6y6pxxXPrvVWRZMN9soNB8AFQCEnqPa9jMSZZDEG
Dropping deployment Qmd3vU6y6pxxXPrvVWRZMN9soNB8AFQCEnqPa9jMSZZDEG
{"jsonrpc":"2.0","result":{"type":"Null"},"id":"1"}%
Perhaps explore Indexer Agent-based solution to avoid graphman drop danger zone?
Perhaps explore Indexer Agent-based solution to avoid
graphman dropdanger zone?
Not sure I understand the argument here. This is a private endpoint, it's as dangerous as letting someone add subgraphs unboundedly and fill up the disks, taking down the graph-node. It is also a basic operational task that currently cannot be automated because it's not exposed in any api.
This pull request hasn't had any activity for the last 90 days. If there's no more activity over the course of the next 14 days, it will automatically be closed.