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

Method upsert_link

backend/src/store.rs:371–391  ·  view source on GitHub ↗
(
        &self,
        input: graphql::UpsertLinkInput,
    )

Source from the content-addressed store, hash-verified

369 }
370
371 pub async fn upsert_link(
372 &self,
373 input: graphql::UpsertLinkInput,
374 ) -> Result<git::UpsertLinkResult> {
375 let add_parent_topic_id = if let Some(id) = &input.add_parent_topic_id {
376 Some(ExternalId::try_from(id)?)
377 } else {
378 None
379 };
380
381 git::UpsertLink {
382 add_parent_topic_id,
383 actor: self.viewer.to_owned(),
384 // FIXME: use id instead of prefix
385 repo_id: input.repo_id.try_into()?,
386 title: input.title,
387 url: input.url,
388 fetcher: Box::new(http::Fetcher),
389 }
390 .call(self.mutation()?, &self.redis)
391 }
392
393 pub async fn upsert_session(
394 &self,

Callers

nothing calls this directly

Calls 3

callMethod · 0.45
try_intoMethod · 0.45
mutationMethod · 0.45

Tested by

no test coverage detected