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

Method selected_repo

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

Source from the content-addressed store, hash-verified

110 }
111
112 pub async fn selected_repo(&self, ctx: &Context<'_>) -> Result<Option<Repository>> {
113 match self {
114 Self::Guest => Ok(None),
115 Self::Registered {
116 selected_repo_id, ..
117 } => match selected_repo_id {
118 Some(id) => ctx.data_unchecked::<Store>().repo(id.to_string()).await,
119 None => Ok(None),
120 },
121 }
122 }
123
124 pub async fn selected_repo_id(&self) -> Result<Option<ID>> {
125 match self {

Callers

nothing calls this directly

Calls 1

repoMethod · 0.45

Tested by

no test coverage detected