Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/deploy-publish-network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@graphprotocol/graph-cli': minor
---

Add `--publish-network` flag to `graph deploy`. When provided, its value is sent
to the deployment router as the `publish_to_graph_network` param of the
`subgraph_deploy` JSON-RPC request. When the flag is omitted, the param is left
out of the request entirely.
5 changes: 5 additions & 0 deletions packages/cli/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export default class DeployCommand extends Command {
summary: 'Version label used for the deployment.',
char: 'l',
}),
'publish-network': Flags.string({
summary: 'Graph network to publish the subgraph to.',
}),
ipfs: Flags.string({
summary: 'Upload build results to an IPFS node.',
char: 'i',
Expand Down Expand Up @@ -98,6 +101,7 @@ export default class DeployCommand extends Command {
'deploy-key': deployKeyFlag,
'access-token': accessToken,
'version-label': versionLabelFlag,
'publish-network': publishNetwork,
ipfs,
headers,
node: nodeFlag,
Expand Down Expand Up @@ -177,6 +181,7 @@ export default class DeployCommand extends Command {
ipfs_hash: ipfsHash,
version_label: versionLabel,
debug_fork: debugFork,
publish_to_graph_network: publishNetwork,
},
async (
// @ts-expect-error TODO: why are the arguments not typed?
Expand Down
Loading