//! This code was AUTOGENERATED using the Codama library.
use {carbon_core::graphql::primitives::Pubkey, juniper::GraphQLObject};

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "UpdateDelegate")]
pub struct UpdateDelegateGraphQL {
    pub additional_delegates: Vec<Pubkey>,
}

impl From<crate::types::UpdateDelegate> for UpdateDelegateGraphQL {
    fn from(original: crate::types::UpdateDelegate) -> Self {
        Self {
            additional_delegates: original
                .additional_delegates
                .into_iter()
                .map(carbon_core::graphql::primitives::Pubkey)
                .collect(),
        }
    }
}
