GitLab graphql get updatedAt in millisecond precision

query {project ( fullPath: “<project_name>”) { issues ( types: [ISSUE] after:“”) { count nodes { title updatedAt id iid } }}}
Graphql api to fetch issues from project returns updatedAt of an issue in seconds precision (“updatedAt”: “2023-05-16T19:46:12Z”)…The GitLab Rest api returns “updated_at”:“2023-05-02T23:41:22.316Z” including milliseconds. Is there a way to get graphql query return in millisecond precision.

The GitLab REST API returns the updated_at field with millisecond precision, as you’ve pointed out. This is represented in the ISO 8601 format with millisecond precision, like so: 2023-05-02T23:41:22.316Z.

On the other hand, the GitLab GraphQL API returns the updatedAt field with second precision, like so: 2023-05-16T19:46:12Z. This is a design decision made by the GitLab team to ensure consistency across all GraphQL API responses.

As of now, there isn’t a way to get the updatedAt field in millisecond precision directly from the GraphQL API. The GraphQL API is designed to return date-time fields in second precision as per the ISO 8601 standard.

If you need millisecond precision, you would have to use the REST API. However, if you’re working with the GraphQL API and need to maintain consistency, you might have to work with the second precision and adjust your logic accordingly. While this might seem like a limitation, this is a common practice in many GraphQL implementations to ensure consistency.