Skip to content

Commit bb2cc0f

Browse files
committed
Fill up CHANGELOG for juniper crate
1 parent c4d8766 commit bb2cc0f

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

juniper/CHANGELOG.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,31 @@ All user visible changes to `juniper` crate will be documented in this file. Thi
6767
- Switched `ParseError::UnexpectedToken` to `compact_str::CompactString` instead of `smartstring::SmartString`. ([20609366])
6868
- Replaced `Value`'s `From` implementations with `IntoValue` ones. ([#1324])
6969
- 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`.
7095

7196
### Added
7297

@@ -82,8 +107,15 @@ All user visible changes to `juniper` crate will be documented in this file. Thi
82107
- `http::GraphQLResponse::into_result()` method. ([#1293])
83108
- `String` scalar implementation for `arcstr::ArcStr`. ([#1247])
84109
- `String` scalar implementation for `compact_str::CompactString`. ([20609366])
85-
- `ScalarValue::from_displayable()` method allowing to specialize `ScalarValue` conversion from custom string types. ([#1324], [#819])
86110
- `IntoValue` and `IntoInputValue` conversion traits allowing to work around orphan rules with custom `ScalarValue`. ([#1324])
111+
- `ScalarValue` trait: ([#1327])
112+
- `from_displayable()` method allowing to specialize `ScalarValue` conversion from custom string types. ([#1324], [#819])
113+
- `try_to::<T>()` method defined by default as `TryScalarValueTo<T>` alias.
114+
- `TryScalarValueTo` conversion trait aiding `ScalarValue` trait. ([#1327])
115+
- `#[derive(GraphQLScalar)]` and `#[graphql_scalar]` macros: ([#1327])
116+
- Support for specifying concrete types as input argument in provided `from_input()` function.
117+
- Support for non-`Result` return type in provided `from_input()` function.
118+
- `Scalar` transparent wrapper for aiding type inference in `from_input()` function when input argument is generic `ScalarValue`.
87119

88120
### Changed
89121

@@ -110,6 +142,7 @@ All user visible changes to `juniper` crate will be documented in this file. Thi
110142
[#1318]: /../../pull/1318
111143
[#1324]: /../../pull/1324
112144
[#1326]: /../../pull/1326
145+
[#1327]: /../../pull/1327
113146
[1b1fc618]: /../../commit/1b1fc61879ffdd640d741e187dc20678bf7ab295
114147
[20609366]: /../../commit/2060936635609b0186d46d8fbd06eb30fce660e3
115148

@@ -313,6 +346,7 @@ See [old CHANGELOG](/../../blob/juniper-v0.15.12/juniper/CHANGELOG.md).
313346
[`bson` crate]: https://docs.rs/bson
314347
[`chrono` crate]: https://docs.rs/chrono
315348
[`chrono-tz` crate]: https://docs.rs/chrono-tz
349+
[`derive_more` crate]: https://docs.rs/derive_more
316350
[`jiff` crate]: https://docs.rs/jiff
317351
[`time` crate]: https://docs.rs/time
318352
[Cargo feature]: https://doc.rust-lang.org/cargo/reference/features.html

juniper_codegen/CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ All user visible changes to `juniper_codegen` crate will be documented in this f
1010

1111
### BC Breaks
1212

13+
- Bumped up [MSRV] to 1.85. ([#1272], [1b1fc618])
1314
- `#[derive(ScalarValue)]` macro: ([#1327])
1415
- Renamed `#[value(as_bool)]` attribute as `#[value(to_bool)]`.
1516
- Renamed `#[value(as_float)]` attribute as `#[value(to_float)]`.
@@ -20,11 +21,11 @@ All user visible changes to `juniper_codegen` crate will be documented in this f
2021
- `From` and `Display` implementations are not derived anymore.
2122
- `#[derive(GraphQLScalar)]` and `#[graphql_scalar]` macros: ([#1327])
2223
- Made provided `from_input()` function to accept `ScalarValue` directly instead of `InputValue`.
23-
- Bumped up [MSRV] to 1.85. ([#1272], [1b1fc618])
2424

2525
### Added
2626

27-
- Support of top-level `#[value(from_displayable_with = ...)]` attribute in `#[derive(ScalarValue)]` macro. ([#1324])
27+
- `#[derive(ScalarValue)]` macro: ([#1324])
28+
- Support of top-level `#[value(from_displayable_with = ...)]` attribute.
2829
- `#[derive(GraphQLScalar)]` and `#[graphql_scalar]` macros: ([#1327])
2930
- Support for specifying concrete types as input argument in provided `from_input()` function.
3031
- Support for non-`Result` return type in provided `from_input()` function.

0 commit comments

Comments
 (0)