MCPcopy Create free account
hub / github.com/emwalker/digraph / link

Method link

backend/src/graphql/link.rs:66–78  ·  view source on GitHub ↗
(&self, ctx: &Context<'_>)

Source from the content-addressed store, hash-verified

64 }
65
66 async fn link(&self, ctx: &Context<'_>) -> Result<Link> {
67 let link_id = self.0.link_id();
68
69 let link: Option<git::Link> = ctx
70 .data_unchecked::<Store>()
71 .fetch_link(link_id.to_owned())
72 .await?;
73
74 match link {
75 Some(link) => Ok(link.into()),
76 None => Err(Error::NotFound(format!("parent link not found: {link_id}"))),
77 }
78 }
79
80 async fn link_id(&self) -> String {
81 self.0.link_id().to_string()

Callers

nothing calls this directly

Calls 2

link_idMethod · 0.45
fetch_linkMethod · 0.45

Tested by

no test coverage detected