Migrate to Java 17 and Spring Boot 3.2; Jakarta migration; remove Joda-Time; dependency and CI updates#331
Conversation
…or java.time, update security config, upgrade deps, update CI, fix DGS PageInfo + JWT for JJWT 0.12 Co-Authored-By: milind@cognition.ai <milind@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| .body(comment.getBody()) | ||
| .updatedAt(ISODateTimeFormat.dateTime().withZoneUTC().print(comment.getCreatedAt())) | ||
| .createdAt(ISODateTimeFormat.dateTime().withZoneUTC().print(comment.getCreatedAt())) | ||
| .updatedAt(DateTimeFormatter.ISO_INSTANT.format(comment.getCreatedAt())) |
There was a problem hiding this comment.
🟡 Comment updatedAt field incorrectly uses createdAt value
In CommentDatafetcher.buildCommentResult(), the updatedAt field is incorrectly set using comment.getCreatedAt() instead of comment.getUpdatedAt(). This means GraphQL responses for comments will always show the same value for both createdAt and updatedAt, even if the comment was actually updated.
Root Cause
The CommentData class at src/main/java/io/spring/application/data/CommentData.java:19-20 has both createdAt and updatedAt fields:
private Instant createdAt;
private Instant updatedAt;However, the buildCommentResult method uses getCreatedAt() for both fields:
.updatedAt(DateTimeFormatter.ISO_INSTANT.format(comment.getCreatedAt()))
.createdAt(DateTimeFormatter.ISO_INSTANT.format(comment.getCreatedAt()))Impact: GraphQL clients querying comment data will receive incorrect updatedAt timestamps, making it impossible to determine when a comment was last modified.
| .updatedAt(DateTimeFormatter.ISO_INSTANT.format(comment.getCreatedAt())) | |
| .updatedAt(DateTimeFormatter.ISO_INSTANT.format(comment.getUpdatedAt())) |
Was this helpful? React with 👍 or 👎 to provide feedback.
Devin Session: https://app.devin.ai/sessions/22b710840bc04fe08d6068deab44b821