pub mod bonding_curve_schema;
pub mod fee_config_schema;
pub mod fee_program_global_schema;
pub mod global_schema;
pub mod pool_schema;
pub mod sharing_config_schema;
pub mod social_fee_pda_schema;
use juniper::GraphQLObject;
pub use {
bonding_curve_schema::*, fee_config_schema::*, fee_program_global_schema::*, global_schema::*,
pool_schema::*, sharing_config_schema::*, social_fee_pda_schema::*,
};
#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "AccountMetadata")]
pub struct AccountMetadataGraphQL {
pub pubkey: carbon_core::graphql::primitives::Pubkey,
pub slot: Option<carbon_core::graphql::primitives::U64>,
}
impl From<carbon_core::postgres::metadata::AccountRowMetadata> for AccountMetadataGraphQL {
fn from(metadata: carbon_core::postgres::metadata::AccountRowMetadata) -> Self {
Self {
pubkey: carbon_core::graphql::primitives::Pubkey(*metadata.pubkey),
slot: metadata
.slot
.map(|v| carbon_core::graphql::primitives::U64(*v)),
}
}
}