wasccgraph_common/protocol.rs
1//! # Common protocol types
2//!
3//! Used to describe the communication between graphdb actor and graphdb capability
4//! provider.
5
6/// An actor sends a query request (via ergonomic API wrapper) to the capability provider
7#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct QueryRequest {
9 pub query: String,
10 pub graph_name: String,
11}
12
13/// A request to delete a graph
14#[derive(Debug, Clone, Serialize, Deserialize)]
15pub struct DeleteRequest {
16 pub graph_name: String,
17}
18
19/// The operation to request a query of graph data
20pub const OP_QUERY: &str = "QueryGraph";
21/// The operation to request the deletion of a graph
22pub const OP_DELETE: &str = "DeleteGraph";