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

Method viewer

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

Source from the content-addressed store, hash-verified

132 }
133
134 async fn viewer(&self, ctx: &Context<'_>) -> Result<User> {
135 let user = match self.viewer_id.to_string().as_str() {
136 "" => User::Guest,
137 id => ctx
138 .data_unchecked::<Store>()
139 .user(id.to_string())
140 .await?
141 .unwrap_or_default(),
142 };
143
144 Ok(user)
145 }
146}

Callers

nothing calls this directly

Calls 2

as_strMethod · 0.80
userMethod · 0.45

Tested by

no test coverage detected