GraphQL API, Get Updated AT in milliseconds

Solved

GraphQL API, Get Updated AT in milliseconds

Nolan_V
Shopify Partner
11 0 0

Hi, 

I'm using the 2024-04 version of the GraphQL API, and I'm trying to get the updated At Field in milliseconds, but I did not find any information on this. 

Here is the request that I use: 

{ orders(first: 1) { edges { node { id updatedAt } } } }

The Shopify AI told me the API should already return UpdatedAt with the milliseconds, but I only get this:

{
"data": {
"orders": {
"edges": [
{
"node": {
"id": "gid://shopify/Order/26884496290",
"updatedAt": "2024-06-17T11:51:59Z"
}
}


Is there any way to get this field with the milliseconds ? 

 

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1451 238 497

This is an accepted solution.

Hi @Nolan_V,

 

Currently the updatedAt time for objects like Orders will show seconds as the smallest time unit and there isn't an option to show smaller time units when querying the object directly. We'll look into submitting some feedback about that on your behalf.

 

The one thing that gives more precision is the webhook 'triggered at time' in the webhook header values for all webhooks which goes to quite a few decimal points, here's a link to the the related dev docs about that:

https://shopify.dev/docs/apps/build/webhooks#headers

 

 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1451 238 497

This is an accepted solution.

Hi @Nolan_V,

 

Currently the updatedAt time for objects like Orders will show seconds as the smallest time unit and there isn't an option to show smaller time units when querying the object directly. We'll look into submitting some feedback about that on your behalf.

 

The one thing that gives more precision is the webhook 'triggered at time' in the webhook header values for all webhooks which goes to quite a few decimal points, here's a link to the the related dev docs about that:

https://shopify.dev/docs/apps/build/webhooks#headers

 

 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Nolan_V
Shopify Partner
11 0 0

Hi,

Oh, I see. Thank you. If you could consider adding this feature for futures updates, it would be nice because when I call the API to get Orders/Products past a certain date in the field UpdatedAT, the API still understands the milliseconds, it's just when getting the UpdatedAT field in return that the API doesn't handle it.

Have a nice day,
Nolan