You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: juniper/CHANGELOG.md
+35-1Lines changed: 35 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,31 @@ All user visible changes to `juniper` crate will be documented in this file. Thi
67
67
- Switched `ParseError::UnexpectedToken` to `compact_str::CompactString` instead of `smartstring::SmartString`. ([20609366])
68
68
- Replaced `Value`'s `From` implementations with `IntoValue` ones. ([#1324])
69
69
- Replaced `InputValue`'s `From` implementations with `IntoInputValue` ones. ([#1324])
70
+
-`Value` enum: ([#1327])
71
+
- Removed `as_float_value()`, `as_string_value()` and `as_scalar_value()` methods (use `as_scalar()` method and then `ScalarValue` methods instead).
72
+
-`InputValue` enum: ([#1327])
73
+
- Removed `as_float_value()`, `as_int_value()`, `as_string_value()` and `as_scalar_value()` methods (use `as_scalar()` method and then `ScalarValue` methods instead).
74
+
-`ScalarValue` trait: ([#1327])
75
+
- Switched from `From` conversions to `TryScalarValueTo` conversions.
76
+
- Made to require `TryScalarValueTo` conversions for `bool`, `f64`, `i32`, `String` and `&str` types (could be derived with `#[value(<conversion>)]` attributes of `#[derive(ScalarValue)]` macro).
77
+
- Made to require `TryInto<String>` conversion (could be derived with `derive_more::TryInto`).
78
+
- Made `is_type()` method required and to accept `Any` type.
79
+
- Renamed `as_bool()` method to as `try_to_bool()` and made it defined by default as `TryScalarValueTo<bool>` alias.
80
+
- Renamed `as_float()` method to as `try_to_float()` and made it defined by default as `TryScalarValueTo<f64>` alias.
81
+
- Renamed `as_int()` method to as `try_to_int()` and made it defined by default as `TryScalarValueTo<i32>` alias.
82
+
- Renamed `as_string()` method to as `try_to_string()` and made it defined by default as `TryScalarValueTo<String>` alias.
83
+
- Renamed `as_str()` method to as `try_as_str()` and made it defined by default as `TryScalarValueTo<&str>` alias.
84
+
- Renamed `into_string()` method to as `try_into_string()` and made it defined by default as `TryInto<String>` alias.
85
+
-`#[derive(ScalarValue)]` macro: ([#1327])
86
+
- Renamed `#[value(as_bool)]` attribute as `#[value(to_bool)]`.
87
+
- Renamed `#[value(as_float)]` attribute as `#[value(to_float)]`.
88
+
- Renamed `#[value(as_int)]` attribute as `#[value(to_int)]`.
89
+
- Renamed `#[value(as_string)]` attribute as `#[value(to_string)]`.
90
+
- Removed `#[value(into_string)]` attribute.
91
+
- Removed `#[value(allow_missing_attributes)]` attribute (now attributes can always be omitted).
92
+
-`From` and `Display` implementations are not derived anymore (recommended way is to use [`derive_more` crate] for this).
93
+
-`#[derive(GraphQLScalar)]` and `#[graphql_scalar]` macros: ([#1327])
94
+
- Made provided `from_input()` function to accept `ScalarValue` (or anything `TryScalarValueTo`-convertible) directly instead of `InputValue`.
70
95
71
96
### Added
72
97
@@ -82,8 +107,15 @@ All user visible changes to `juniper` crate will be documented in this file. Thi
0 commit comments