MCPcopy Create free account
hub / github.com/hashintel/hash / capture

Method capture

libs/@local/graph/api/src/rest/mod.rs:279–288  ·  view source on GitHub ↗
(&mut self, actor: ActorEntityUuid, query: OpenApiQuery<'_>)

Source from the content-addressed store, hash-verified

277
278 #[expect(clippy::missing_panics_doc)]
279 pub fn capture(&mut self, actor: ActorEntityUuid, query: OpenApiQuery<'_>) {
280 let mut record = serde_json::to_value(query)
281 .change_context(QueryLoggingError)
282 .expect("query should be serializable");
283 record
284 .as_object_mut()
285 .map(|object| object.insert("actor".to_owned(), JsonValue::String(actor.to_string())));
286 self.value = Some(record);
287 self.created_at = Instant::now();
288 }
289
290 /// Sends the captured query to the query logger.
291 ///

Callers 15

d2_output_enabledFunction · 0.45
bless_outputsMethod · 0.45
assert_outputsMethod · 0.45
validate_entityFunction · 0.45
query_entitiesFunction · 0.45
query_entity_subgraphFunction · 0.45
summarize_entitiesFunction · 0.45
diff_entityFunction · 0.45
query_property_typesFunction · 0.45
query_entity_typesFunction · 0.45

Calls 6

StringClass · 0.85
expectMethod · 0.45
change_contextMethod · 0.45
mapMethod · 0.45
insertMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected