[MGNLGQL-83] Support DateTime in GraphQL Created: 12/Apr/21 Updated: 23/Apr/21 Resolved: 16/Apr/21 |
|
| Status: | Closed |
| Project: | Magnolia GraphQL |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.0 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Jaroslav Simak | Assignee: | Jaroslav Simak |
| Resolution: | Done | Votes: | 0 |
| Labels: | VN-Testing | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 0.75d | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Documentation update required: |
Yes
|
| Date of First Response: | |
| Epic Link: | GraphQL Phase 1 |
| Sprint: | HL & LD 26 |
| Story Points: | 2 |
| Description |
|
Our GraphQL formats Date(Time) always into yyyy-mm-dd format. We need to support both Date and DateTime. Plan of action - based on conversation in comments
One corner case we should document: If one decides to decorate CT generated app and enables time picker, then he/she should also decorate the respective GraphQL definition and set the type of the field to DateTime. In the future we plan to add a DateTime property type to ContentTypes system, which will then result in Date Time picker in the app and DateTime output in GraphQL.
Previous Ideas We have a couple of options here:
Option #2 seems most flexible - devs would not need to hassle with datetime formatting on the client and would get exactly what they want (which imo is the GraphQL way). |
| Comments |
| Comment by Jaroslav Simak [ 14/Apr/21 ] |
|