graphql-rust / juniper

GraphQL server library for Rust
Other
5.72k stars 425 forks source link

Add Jiff date/time types `Zoned`/`TimeZone` #1278

Closed sgoll closed 2 months ago

sgoll commented 3 months ago

Description

This is a follow-up to #1271 and adds integration for the following Jiff date/time types:

[^1]: This GraphQL scalar is not documented at https://graphql-scalars.dev but we can introduce it here as laid out in https://github.com/graphql-rust/juniper/issues/1270#issuecomment-2291041828.

[^2]: This GraphQL scalar does not exist yet either. It is the union of GraphQL scalars TimeZone and UtcOffset.

~The new types are hidden behind feature flag jiff-tz because they require enabling the std feature flag for the jiff crate (which is not necessary for the remaining Jiff date/time types introduced in #1271).~

In addition, the jiff crate itself must be installed either with the default feature flags or with explicit feature flags that make the Time Zone Database available as explained in jiff time zone features.

Closes #1270

tyranron commented 3 months ago

@sgoll

The new types are hidden behind feature flag jiff-tz because they require enabling the std feature flag for the jiff crate (which is not necessary for the remaining Jiff date/time types introduced in #1271).

I think this is redundant. juniper at the moment is not capable of acting in no_std, so you could just add that feature and don't bother.

sgoll commented 3 months ago

I think this is redundant. juniper at the moment is not capable of acting in no_std, so you could just add that feature and don't bother.

I removed the feature flag and merged the master branch into this PR. With the recent commit that removed the panic in TimeZone, and the additions to your integration test, this is now ready for review and/or merge, I think.

sgoll commented 3 months ago

I am not sure whether the two failing tests in the last CI run are related to my changes.

LegNeato commented 2 months ago

Failures Re unrelated. Thanks again!