graphql_client_codegen/
deprecation.rs#[derive(Debug, PartialEq, Eq, Hash, Clone)]
pub enum DeprecationStatus {
Current,
Deprecated(Option<String>),
}
#[derive(Debug, PartialEq, Eq, Clone, Default)]
pub enum DeprecationStrategy {
Allow,
Deny,
#[default]
Warn,
}
impl std::str::FromStr for DeprecationStrategy {
type Err = ();
fn from_str(s: &str) -> Result<Self, ()> {
match s.trim() {
"allow" => Ok(DeprecationStrategy::Allow),
"deny" => Ok(DeprecationStrategy::Deny),
"warn" => Ok(DeprecationStrategy::Warn),
_ => Err(()),
}
}
}