pub mod add_strategy_schema;
pub mod collect_dust_schema;
pub mod cpi_event_schema;
pub mod deposit_schema;
pub mod deposit_strategy_schema;
pub mod enable_vault_schema;
pub mod initialize_schema;
pub mod initialize_strategy_schema;
pub mod remove_strategy2_schema;
pub mod remove_strategy_schema;
pub mod set_operator_schema;
pub mod withdraw2_schema;
pub mod withdraw_directly_from_strategy_schema;
pub mod withdraw_schema;
pub mod withdraw_strategy_schema;
use juniper::GraphQLObject;
pub use {
add_strategy_schema::*, collect_dust_schema::*, cpi_event_schema::*, deposit_schema::*,
deposit_strategy_schema::*, enable_vault_schema::*, initialize_schema::*,
initialize_strategy_schema::*, remove_strategy2_schema::*, remove_strategy_schema::*,
set_operator_schema::*, withdraw2_schema::*, withdraw_directly_from_strategy_schema::*,
withdraw_schema::*, withdraw_strategy_schema::*,
};
#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "InstructionMetadata")]
pub struct InstructionMetadataGraphQL {
pub signature: String,
pub instruction_index: carbon_core::graphql::primitives::U32,
pub stack_height: carbon_core::graphql::primitives::U32,
pub slot: Option<carbon_core::graphql::primitives::U64>,
}
impl From<carbon_core::postgres::metadata::InstructionRowMetadata> for InstructionMetadataGraphQL {
fn from(metadata: carbon_core::postgres::metadata::InstructionRowMetadata) -> Self {
Self {
signature: metadata.signature,
instruction_index: carbon_core::graphql::primitives::U32(
(*metadata.instruction_index) as u32,
),
stack_height: carbon_core::graphql::primitives::U32((*metadata.stack_height) as u32),
slot: metadata
.slot
.map(|v| carbon_core::graphql::primitives::U64(*v)),
}
}
}