Add AccurateDuration and NominalDuration#24
Conversation
This pull request attempts to document two different types of Durations per the ISO 8601 standard: - `AccurateDuration`, relating to the portion of a Duration that is context-free (that is, it only contains seconds, minutes, hours, and 24-hour days). - `NominalDuration`, relating ot the portion that is dependent on the position in the calendar with respect to which the duration is being evaluated. It contains calendar years, months, weeks and days. Please see graphql-java/graphql-java-extended-scalars#132 for the implementation in `graphql-java`.
Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
|
What's needed to make this progress further? We're currently defining our own Duration, but it would be great to standardize. |
|
Hello, I'd like to revisit this soon. We're preparing to release the next major version of GraphQL Java now, after that let's come back to this scalar discussion |
|
@dondonz any news here? |
|
2026 cleanup, I'm closing this. If this is still worked on, please leave a comment and I'll reopen. |
andimarek
left a comment
There was a problem hiding this comment.
It would be create to change the Name section into Recommend Name to align with the current template, as name was a confusing section in the past.
The actual Scalar name used is arbitrary and any scalar name can be used with any spec.
| # Name | ||
|
|
||
| `AccurateDuration`, originating from the wording in | ||
| [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601): |
There was a problem hiding this comment.
ISO 8601 is always tricky to reference as it is not a public spec and the only source you can really quote is wikipediate, which is not the spec itself.
I don't have great solution for that.
There was a problem hiding this comment.
I did comb through RFC 3339 in the hopes I could reference this instead, but no dice. I agree it would be better to reference a spec that is public, but most languages offer support for ISO-8601 parsing. I am confident this could be implemented for a majority of GraphQL libraries (it was certainly straightforward to implement for Java).
This aligns with the current template as "Name" was confusing in the past.
|
Hey everyone, apologies for the lack of activity. I failed to read the fine print in the
I had assumed that it would be merged for me once reviewers were happy with it. I've chatted with @andimarek and if he's happy with the specification after my updates (I personally think it's ready to go) I'll ask him to merge it. |
|
@AlexandreCarlton no worries! The text you quote is a recent addition. Thanks for looking into this. |
|
|
This pull request attempts to document two different types of Durations per the ISO 8601 standard:
AccurateDuration, relating to the portion of a Duration that is context-free (that is, it only contains seconds, minutes, hours, and 24-hour days).NominalDuration, relating ot the portion that is dependent on the position in the calendar with respect to which the duration is being evaluated. It contains calendar years, months, weeks and days.Please see graphql-java/graphql-java-extended-scalars#132 for the proposed implementation in
graphql-java.