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

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "Creator")]
pub struct CreatorGraphQL {
    pub address: Pubkey,
    pub percentage: U8,
}

impl From<crate::types::Creator> for CreatorGraphQL {
    fn from(original: crate::types::Creator) -> Self {
        Self {
            address: carbon_core::graphql::primitives::Pubkey(original.address),
            percentage: carbon_core::graphql::primitives::U8(original.percentage),
        }
    }
}
