Skip to content

Commit b166e85

Browse files
Merge branch 'master' into feature/1609-managed-resources-prototype-stage1
2 parents 118cf12 + 3425d7a commit b166e85

14 files changed

Lines changed: 9596 additions & 2534 deletions

File tree

src/adapter/graphql/src/scalars/account.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,34 @@ impl From<AccountRef> for odf::metadata::auth::AccountRef {
4747
}
4848
}
4949

50+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
51+
52+
#[derive(Debug, Clone)]
53+
pub struct AccountHandle(odf::metadata::auth::AccountHandle);
54+
55+
#[Object]
56+
impl AccountHandle {
57+
pub async fn id(&self) -> AccountID<'_> {
58+
AccountID::from(&self.0.id)
59+
}
60+
61+
pub async fn name(&self) -> AccountName<'_> {
62+
AccountName::from(&self.0.name)
63+
}
64+
}
65+
66+
impl From<odf::metadata::auth::AccountHandle> for AccountHandle {
67+
fn from(value: odf::metadata::auth::AccountHandle) -> Self {
68+
Self(value)
69+
}
70+
}
71+
72+
impl From<AccountHandle> for odf::metadata::auth::AccountHandle {
73+
fn from(value: AccountHandle) -> Self {
74+
value.0
75+
}
76+
}
77+
5078
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5179
// AccountDisplayName
5280
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)