pub trait GraphRecall: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn add_node(&self, node: &GraphNode) -> Result<(), CapabilityError>;
fn add_edge(&self, edge: &GraphEdge) -> Result<(), CapabilityError>;
fn traverse(
&self,
query: &GraphQuery,
) -> Result<GraphResult, CapabilityError>;
fn find_nodes(
&self,
label: &str,
properties: Option<&Value>,
) -> Result<Vec<GraphNode>, CapabilityError>;
fn get_node(&self, id: &str) -> Result<Option<GraphNode>, CapabilityError>;
fn delete_node(&self, id: &str) -> Result<(), CapabilityError>;
fn clear(&self) -> Result<(), CapabilityError>;
}Expand description
Trait for graph stores that enable knowledge graph operations.
Graph stores capture structured relationships between entities. Like vector stores, they are caches that can be rebuilt.