Trait juniper::FromInputValue
source · pub trait FromInputValue<S = DefaultScalarValue>: Sized {
fn from_input_value(v: &InputValue<S>) -> Option<Self>
where
for<'b> &'b S: ScalarRefValue<'b>;
}
Expand description
Parse an unstructured input value into a Rust data type.
The conversion can fail, and must in that case return None. Implemented
automatically by the convenience macro graphql_scalar!
or by deriving GraphQLEnum.
Must be implemented manually when manually exposing new enums or scalars.
Required Methods
sourcefn from_input_value(v: &InputValue<S>) -> Option<Self>where
for<'b> &'b S: ScalarRefValue<'b>,
fn from_input_value(v: &InputValue<S>) -> Option<Self>where
for<'b> &'b S: ScalarRefValue<'b>,
Performs the conversion.