store/products?order=created_at&order=-size Order parameter doesn't have support to order product listing by multiple columns or properties
Describe the bug
In our use cases, on website we are listing the products in table list format where we want to allow user to sort products by multiple products properties
As shown in attached example, it seems medusa STORE APIs are having single column sorting or ordering
When I pass the multiple params in order request parameter, it results in 400 bad request
Expected behavior
order request parameter suppose to be access multiple columns as value with order preference and sort the result accordingly
Exact behaviour of following SELECT statement in RDBMS
Select * from products order by size desc, discount desc, price
Bug report
store/products?order=created_at&order=-size
Order parameter doesn't have support to order product listing by multiple columns or propertiesDescribe the bug
In our use cases, on website we are listing the products in table list format where we want to allow user to sort products by multiple products properties
As shown in attached example, it seems medusa STORE APIs are having single column sorting or ordering
When I pass the multiple params in order request parameter, it results in 400 bad request
Expected behavior
order
request parameter suppose to be access multiple columns as value with order preference and sort the result accordinglyExact behaviour of following
SELECT
statement in RDBMSSelect * from products order by size desc, discount desc, price
Medusa API representation
store/products?order=-size&order=-discount&order=price
store/products?order=-size,-discount,price
Screenshots
Code snippets
Sample of CURL request
curl --location --request GET 'localhost:9000/store/products?order=created_at&order=-size' \ --header 'Content-Type: application/json' \ --data '{ "q": "Medusa" }'