MCPcopy Create free account
hub / github.com/Pometry/Raphtory / add_node

Method add_node

raphtory-graphql/src/python/client/remote_graph.rs:227–246  ·  view source on GitHub ↗
(
        &self,
        timestamp: EventTime,
        id: GID,
        properties: Option<HashMap<String, Prop>>,
        node_type: Option<&str>,
        layer: Option<&str>,
    )

Source from the content-addressed store, hash-verified

225 /// RemoteNode: the new remote node
226 #[pyo3(signature = (timestamp, id, properties = None, node_type = None, layer = None))]
227 pub fn add_node(
228 &self,
229 timestamp: EventTime,
230 id: GID,
231 properties: Option<HashMap<String, Prop>>,
232 node_type: Option<&str>,
233 layer: Option<&str>,
234 ) -> Result<PyRemoteNode, ClientError> {
235 let graph = Arc::clone(&self.graph);
236 let node_type = node_type.map(|s| s.to_string());
237 let layer = layer.map(|s| s.to_string());
238
239 let node = execute_async_task(move || async move {
240 graph
241 .add_node(timestamp, id, properties, node_type, layer)
242 .await
243 })?;
244
245 Ok(PyRemoteNode::new(node))
246 }
247
248 /// Create a new node with the given id and properties to the remote graph and fail if the node already exists.
249 ///

Callers

nothing calls this directly

Calls 3

execute_async_taskFunction · 0.85
to_stringMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected