Skip to content

Commit 28c1544

Browse files
committed
node: remove create flag from graphman deploy
1 parent 59da2dd commit 28c1544

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

node/src/bin/manager.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,6 @@ pub enum Command {
359359
/// The url of the graph-node
360360
#[clap(long, short, default_value = "http://localhost:8020")]
361361
url: String,
362-
363-
/// Create the subgraph name if it does not exist
364-
#[clap(long, short)]
365-
create: bool,
366362
},
367363
}
368364

@@ -1637,12 +1633,11 @@ async fn main() -> anyhow::Result<()> {
16371633
deployment,
16381634
name,
16391635
url,
1640-
create,
16411636
} => {
16421637
let store = ctx.store();
16431638
let subgraph_store = store.subgraph_store();
16441639

1645-
commands::deploy::run(subgraph_store, deployment, name, url, create).await
1640+
commands::deploy::run(subgraph_store, deployment, name, url).await
16461641
}
16471642
}
16481643
}

node/src/manager/commands/deploy.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ pub async fn run(
6868
deployment: DeploymentSearch,
6969
search: DeploymentSearch,
7070
url: String,
71-
create: bool,
7271
) -> Result<()> {
7372
let hash = match deployment {
7473
DeploymentSearch::Hash { hash, shard: _ } => hash,
@@ -85,17 +84,12 @@ pub async fn run(
8584

8685
let exists = subgraph_store.subgraph_exists(&subgraph_name)?;
8786

88-
if create && !exists {
87+
if !exists {
8988
println!("Creating subgraph `{}`", name);
9089

9190
// Send the subgraph_create request
9291
send_create_request(&name, &url).await?;
9392
println!("Subgraph `{}` created", name);
94-
} else if !create && !exists {
95-
bail!(
96-
"Subgraph with name `{}` does not exist. Use the `--create` flag to create it",
97-
name
98-
);
9993
}
10094

10195
// Send the subgraph_deploy request

0 commit comments

Comments
 (0)