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

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "WriteCollectionExternalPluginAdapterDataV1Args")]
pub struct WriteCollectionExternalPluginAdapterDataV1ArgsGraphQL {
    pub key: ExternalPluginAdapterKeyGraphQL,
    pub data: Option<Vec<U8>>,
}

impl From<crate::types::WriteCollectionExternalPluginAdapterDataV1Args>
    for WriteCollectionExternalPluginAdapterDataV1ArgsGraphQL
{
    fn from(original: crate::types::WriteCollectionExternalPluginAdapterDataV1Args) -> Self {
        Self {
            key: original.key.into(),
            data: original.data.map(|v| {
                v.into_iter()
                    .map(carbon_core::graphql::primitives::U8)
                    .collect()
            }),
        }
    }
}
