Sort getAllProducts by -updated_at when using a taxonomy

This commit is contained in:
tniezg
2021-09-13 16:06:49 +02:00
parent c8ee3ef293
commit fed88c8485

View File

@@ -49,7 +49,7 @@ export default function getAllProductsOperation({
const first = getAllProductsVariables.first const first = getAllProductsVariables.first
const filter = !defaultProductsTaxonomyId const filter = !defaultProductsTaxonomyId
? {} ? {}
: { filter: { taxons: defaultProductsTaxonomyId } } : { filter: { taxons: defaultProductsTaxonomyId }, sort: '-updated_at' }
const variables: SpreeSdkVariables = { const variables: SpreeSdkVariables = {
methodPath: 'products.list', methodPath: 'products.list',