use crate::config::{DataLoadConfiguration, DatabaseConfiguration};
use crate::errors::GraphLoaderError;
use crate::graph_loader::{CollectionInfo, GraphLoader};
pub async fn load_named_graph(
db_config: DatabaseConfiguration,
load_config: DataLoadConfiguration,
graph_name: String,
vertex_global_fields: Option<Vec<String>>,
edge_global_fields: Option<Vec<String>>,
) -> Result<GraphLoader, GraphLoaderError> {
GraphLoader::new_named(
db_config,
load_config,
graph_name,
vertex_global_fields,
edge_global_fields,
)
.await
}
pub async fn load_custom_graph(
db_config: DatabaseConfiguration,
load_config: DataLoadConfiguration,
vertex_collections: Vec<CollectionInfo>,
edge_collections: Vec<CollectionInfo>,
) -> Result<GraphLoader, GraphLoaderError> {
GraphLoader::new_custom(db_config, load_config, vertex_collections, edge_collections).await
}