Skip to content

Commit 4f57d9a

Browse files
authored
Added documentation for LocalDate/LocalDateTime/LocalTime changes (#7750)
1 parent 4adca9e commit 4f57d9a

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

website/src/docs/hotchocolate/v15/defining-a-schema/scalars.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -194,18 +194,23 @@ scalar DateTime @specifiedBy(url: "https://www.graphql-scalars.com/date-time/")
194194

195195
In addition to the scalars defined by the specification, Hot Chocolate also supports the following set of scalar types:
196196

197-
| Type | Description |
198-
| ----------- | ------------------------------------------------------------ |
199-
| `Byte` | Byte |
200-
| `ByteArray` | Base64 encoded array of bytes |
201-
| `Short` | Signed 16-bit numeric non-fractional value |
202-
| `Long` | Signed 64-bit numeric non-fractional value |
203-
| `Decimal` | .NET Floating Point Type |
204-
| `Url` | Url |
205-
| `Date` | ISO-8601 date |
206-
| `TimeSpan` | ISO-8601 duration |
207-
| `Uuid` | GUID |
208-
| `Any` | This type can be anything, string, int, list or object, etc. |
197+
| Type | Description |
198+
| --------------- | ------------------------------------------------------------------------------------------------ |
199+
| `Byte` | Byte |
200+
| `ByteArray` | Base64 encoded array of bytes |
201+
| `Short` | Signed 16-bit numeric non-fractional value |
202+
| `Long` | Signed 64-bit numeric non-fractional value |
203+
| `Decimal` | .NET Floating Point Type |
204+
| `Url` | Url |
205+
| `Date` | ISO-8601 date |
206+
| `LocalDate` | ISO date string, represented as UTF-8 character sequences YYYY-MM-DD, as defined in [RFC3339][1] |
207+
| `LocalDateTime` | Local date/time string (i.e., with no associated timezone) with the format `YYYY-MM-DDThh:mm:ss` |
208+
| `LocalTime` | Local time string (i.e., with no associated timezone) in 24-hr `HH:mm:ss` |
209+
| `TimeSpan` | ISO-8601 duration |
210+
| `Uuid` | GUID |
211+
| `Any` | This type can be anything, string, int, list or object, etc. |
212+
213+
[1]: https://tools.ietf.org/html/rfc3339
209214

210215
## Uuid Type
211216

@@ -305,16 +310,14 @@ To use these scalars we have to add the `HotChocolate.Types.Scalars` package.
305310
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
306311
| EmailAddress | Email address, represented as UTF-8 character sequences, as defined in [RFC5322](https://tools.ietf.org/html/rfc5322) |
307312
| HexColor | HEX color code |
308-
| Hsl | CSS HSL color as defined [here][1] |
309-
| Hsla | CSS HSLA color as defined [here][1] |
313+
| Hsl | CSS HSL color as defined [here][2] |
314+
| Hsla | CSS HSLA color as defined [here][2] |
310315
| IPv4 | IPv4 address as defined [here](https://en.wikipedia.org/wiki/IPv4) |
311316
| IPv6 | IPv6 address as defined in [RFC8064](https://tools.ietf.org/html/rfc8064) |
312317
| Isbn | ISBN-10 or ISBN-13 number as defined [here](https://en.wikipedia.org/wiki/International_Standard_Book_Number) |
313318
| Latitude | Decimal degrees latitude number |
314319
| Longitude | Decimal degrees longitude number |
315320
| LocalCurrency | Currency string |
316-
| LocalDate | ISO date string, represented as UTF-8 character sequences yyyy-mm-dd, as defined in [RFC3339][2] |
317-
| LocalTime | Local time string (i.e., with no associated timezone) in 24-hr `HH:mm:ss` |
318321
| MacAddress | IEEE 802 48-bit (MAC-48/EUI-48) and 64-bit (EUI-64) Mac addresses, represented as UTF-8 character sequences, as defined in [RFC7042][3] and [RFC7043][4] |
319322
| NegativeFloat | Double‐precision fractional value less than 0 |
320323
| NegativeInt | Signed 32-bit numeric non-fractional with a maximum of -1 |
@@ -335,8 +338,7 @@ To use these scalars we have to add the `HotChocolate.Types.Scalars` package.
335338
| UnsignedShort | Unsigned 16‐bit numeric non‐fractional value greater than or equal to 0 and smaller or equal to 65535. |
336339
| UtcOffset | A value of format `±hh:mm` |
337340

338-
[1]: https://developer.mozilla.org/docs/Web/CSS/color_value#hsl_colors
339-
[2]: https://tools.ietf.org/html/rfc3339
341+
[2]: https://developer.mozilla.org/docs/Web/CSS/color_value#hsl_colors
340342
[3]: https://tools.ietf.org/html/rfc7042#page-19
341343
[4]: https://tools.ietf.org/html/rfc7043
342344

website/src/docs/hotchocolate/v15/migrating/migrate-from-14-to-15.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ Use the `LocalDate` type if you do not want the date to be converted to universa
4141

4242
Please ensure that your clients are sending date/time strings in the correct format to avoid errors.
4343

44+
## LocalDate and LocalTime scalars moved
45+
46+
`LocalDate` and `LocalTime` have been moved from `HotChocolate.Types.Scalars` to `HotChocolate.Types`, and are therefore available without installing the additional package.
47+
48+
## DateOnly and TimeOnly binding change
49+
50+
- `DateOnly` is now bound to `LocalDateType` instead of `DateType`.
51+
- `TimeOnly` is now bound to `LocalTimeType` instead of `TimeSpanType`.
52+
4453
# Deprecations
4554

4655
Things that will continue to function this release, but we encourage you to move away from.

0 commit comments

Comments
 (0)