"components/404/ParticlesML.vue" did not exist on "3c34e1e6c1af6fd99b9bb65b24449031c04d7b7d"
Newer
Older
pub use graphql_client::{reqwest::post_graphql, GraphQLQuery};
schema_path = "res/indexer-schema.json",
query_path = "res/indexer-queries.graphql"
schema_path = "res/indexer-schema.json",
query_path = "res/indexer-queries.graphql"
pub async fn username_by_pubkey(&self, pubkey: &str) -> Result<Option<String>> {
Ok(post_graphql::<IdentityNameByPubkey, _>(
&self.gql_client,
identity_name_by_pubkey::Variables {
pubkey: pubkey.to_string(),
},
)
.await?
.data
.and_then(|data| data.identity.into_iter().next().map(|idty| idty.name)))
}
pub async fn pubkey_by_username(&self, username: &str) -> Result<Option<String>> {
Ok(post_graphql::<IdentityPubkeyByName, _>(
&self.gql_client,
identity_pubkey_by_name::Variables {
name: username.to_string(),
},
)
.await?
.data
.and_then(|data| data.identity_by_pk.map(|idty| idty.pubkey)))
}