use serde::{Deserialize, Serialize};
use serde_json::Value as JsonValue;
use std::collections::HashMap;
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct GraphNode {
pub id: String,
pub labels: Vec<String>,
pub properties: HashMap<String, JsonValue>,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct GraphEdge {
pub id: String,
pub from: String,
pub to: String,
pub rel_type: String,
pub properties: HashMap<String, JsonValue>,
}
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct GraphSubgraph {
pub nodes: Vec<GraphNode>,
pub edges: Vec<GraphEdge>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum GraphQuery {
Cypher(String),
GraphQl(String),
}