I'm currently looping my whole list of products I get from shopify and get the updated date of the object, is there a more optimized way to use it? does shopify have a resource to get the latest updated products so I can optimize my work
According to the documentation, you should be able to get a list of products filtering on three specific date fields ... published_at_min, created_at_min and the one you likely want, updated_at_min.
https://shopify.dev/api/admin-rest/2022-01/resources/product#[get]/admin/api/2022-01/products.json
import Shopify from '@shopify/shopify-api';
const client = new Shopify.Clients.Rest('your-development-store.myshopify.com', accessToken);
const data = await client.get({
path: 'products',
query: {"updated_at_min":"2021-01-15T16:15:00-04:00"},
});
Add it to your query and go from there.