diff --git a/juniper/CHANGELOG.md b/juniper/CHANGELOG.md index 1e75241f9..e13b2753e 100644 --- a/juniper/CHANGELOG.md +++ b/juniper/CHANGELOG.md @@ -34,7 +34,7 @@ All user visible changes to `juniper` crate will be documented in this file. Thi ### Added -- [`jiff` crate] integration behind `jiff` [Cargo feature]: ([#1271], [#1278], [#1270]) +- [`jiff` crate] integration behind `jiff` [Cargo feature]: ([#1271], [#1278], [#1270], [#1311]) - `jiff::civil::Date` as `LocalDate` scalar. - `jiff::civil::Time` as `LocalTime` scalar. - `jiff::civil::DateTime` as `LocalDateTime` scalar. ([#1275]) @@ -58,6 +58,7 @@ All user visible changes to `juniper` crate will be documented in this file. Thi [#1281]: /../../pull/1281 [#1284]: /../../pull/1284 [#1300]: /../../pull/1300 +[#1311]: /../../pull/1311 diff --git a/juniper/Cargo.toml b/juniper/Cargo.toml index 0741bd9e0..43eef3759 100644 --- a/juniper/Cargo.toml +++ b/juniper/Cargo.toml @@ -53,7 +53,7 @@ fnv = "1.0.5" futures = { version = "0.3.22", features = ["alloc"], default-features = false } graphql-parser = { version = "0.4", optional = true } indexmap = { version = "2.0", features = ["serde"] } -jiff = { version = "0.1.19", features = ["std"], default-features = false, optional = true } +jiff = { version = "0.2", features = ["std"], default-features = false, optional = true } juniper_codegen = { version = "0.16.0", path = "../juniper_codegen" } rust_decimal = { version = "1.20", default-features = false, optional = true } ryu = { version = "1.0", optional = true } @@ -78,7 +78,7 @@ void = { version = "1.0.2", optional = true } [dev-dependencies] bencher = "0.1.2" chrono = { version = "0.4.30", features = ["alloc"], default-features = false } -jiff = { version = "0.1.19", features = ["tzdb-bundle-always"], default-features = false } +jiff = { version = "0.2", features = ["tzdb-bundle-always"], default-features = false } pretty_assertions = "1.0.0" serde_json = "1.0.18" serial_test = "3.0" diff --git a/juniper/src/integrations/jiff.rs b/juniper/src/integrations/jiff.rs index 973de0d89..401ff75b7 100644 --- a/juniper/src/integrations/jiff.rs +++ b/juniper/src/integrations/jiff.rs @@ -373,7 +373,7 @@ mod time_zone_or_utc_offset { use super::*; /// Format of a [`TimeZoneOrUtcOffset`] scalar. - const FORMAT: &str = "%:V"; + const FORMAT: &str = "%:Q"; pub(super) fn to_output(v: &TimeZoneOrUtcOffset) -> Value where @@ -1159,7 +1159,7 @@ mod duration_test { ), ] { let input: InputValue = graphql_input_value!((raw)); - let parsed = Duration::from_input_value(&input); + let parsed = Duration::from_input_value(&input).map(Duration::fieldwise); assert!( parsed.is_ok(), @@ -1234,7 +1234,7 @@ mod duration_test { ), ] { let input: InputValue = graphql_input_value!((raw)); - let parsed = Duration::from_input_value(&input); + let parsed = Duration::from_input_value(&input).map(Duration::fieldwise); assert!( parsed.is_ok(),