Skip to content

Document AlwaysOutputFractionalSeconds in scalars guide#9748

Merged
glen-84 merged 2 commits into
mainfrom
gai/document-always-output-fractional-seconds
May 20, 2026
Merged

Document AlwaysOutputFractionalSeconds in scalars guide#9748
glen-84 merged 2 commits into
mainfrom
gai/document-always-output-fractional-seconds

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented May 20, 2026

Summary

  • Documents the new AlwaysOutputFractionalSeconds option for the DateTime / LocalDateTime / LocalTime scalars in the v16 scalars guide.
  • Covers both the BCL-backed HotChocolate.Types.DateTimeOptions and the NodaTime-backed HotChocolate.Types.NodaTime.DateTimeOptions: lists the option alongside the existing precision/validation knobs, explains the default trailing-zero-stripping behavior with an example, notes that the option is a no-op when OutputPrecision is 0, and updates the customization snippet for both packages to show the option in use.

Copilot AI review requested due to automatic review settings May 20, 2026 09:56
@github-actions github-actions Bot added the 📚 documentation This issue is about working on our documentation. label May 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the HotChocolate v16 scalars guide to document the AlwaysOutputFractionalSeconds option for the built-in date/time scalars, clarifying the default serialization behavior and showing how to enable fixed-width fractional seconds output.

Changes:

  • Added AlwaysOutputFractionalSeconds to the list of DateTimeOptions configuration knobs for BCL-backed scalars.
  • Documented the default trailing-zero stripping behavior with an example and described how to override it.
  • Updated the customization snippet to set AlwaysOutputFractionalSeconds = true alongside OutputPrecision.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread website/src/docs/hotchocolate/v16/defining-a-schema/scalars.md Outdated
Comment thread website/src/docs/hotchocolate/v16/defining-a-schema/scalars.md
@glen-84 glen-84 merged commit 850f6ca into main May 20, 2026
17 checks passed
@glen-84 glen-84 deleted the gai/document-always-output-fractional-seconds branch May 20, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 documentation This issue is about working on our documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants