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

Method query

raphtory-graphql/src/python/client/raphtory_client.rs:77–91  ·  view source on GitHub ↗
(
        &self,
        py: Python<'py>,
        query: String,
        variables: Option<HashMap<String, Bound<'py, PyAny>>>,
    )

Source from the content-addressed store, hash-verified

75 /// dict[str, Any]: The data field from the graphQL response.
76 #[pyo3(signature = (query, variables = None))]
77 pub(crate) fn query<'py>(
78 &self,
79 py: Python<'py>,
80 query: String,
81 variables: Option<HashMap<String, Bound<'py, PyAny>>>,
82 ) -> PyResult<Bound<'py, PyDict>> {
83 let variables = variables.unwrap_or_else(|| HashMap::new());
84 let mut json_variables = HashMap::new();
85 for (key, value) in variables {
86 let json_value = translate_from_python(value)?;
87 json_variables.insert(key, json_value);
88 }
89 let data = py.detach(|| self.query_with_json_variables(query, json_variables))?;
90 translate_map_to_python(py, data)
91 }
92
93 /// Send a graph to the server
94 ///

Callers 3

add_nodesMethod · 0.45
add_edgesMethod · 0.45

Calls 4

translate_from_pythonFunction · 0.85
translate_map_to_pythonFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected