bluejay_core/definition/
input_value_definition.rs

1use crate::definition::{HasDirectives, InputType};
2use crate::ConstValue;
3
4pub trait InputValueDefinition: HasDirectives {
5    type InputType: InputType;
6    type Value: ConstValue;
7
8    fn description(&self) -> Option<&str>;
9    fn name(&self) -> &str;
10    fn r#type(&self) -> &Self::InputType;
11    fn default_value(&self) -> Option<&Self::Value>;
12
13    fn is_required(&self) -> bool {
14        self.default_value().is_none() && self.r#type().is_required()
15    }
16}