-
Notifications
You must be signed in to change notification settings - Fork 982
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use std::sync::Arc; | ||
|
||
use graph::prelude::{anyhow, Error, SubgraphName, SubgraphStore as _}; | ||
use graph_store_postgres::SubgraphStore; | ||
|
||
pub fn run(store: Arc<SubgraphStore>, name: String) -> Result<(), Error> { | ||
let name = SubgraphName::new(name.clone()) | ||
.map_err(|()| anyhow!("illegal subgraph name `{}`", name))?; | ||
|
||
println!("creating subgraph {}", name); | ||
store.create_subgraph(name)?; | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
pub mod assign; | ||
pub mod config; | ||
pub mod copy; | ||
pub mod create; | ||
pub mod info; | ||
pub mod listen; | ||
pub mod query; | ||
|