Fix(medusa, inventory, stock-location, types, utils): Modules sdk build query (#5713)
* remove defaults * take 2 * works now * add changeset * pricing module and pricing service list take null updates * update handlers * update product module service with take:null where relevant * no spread * note to self:default offset should be 0, not 15
This commit is contained in:
@@ -13,8 +13,16 @@ export function buildQuery<T = any, TDto = any>(
|
||||
const findOptions: DAL.OptionsQuery<T, any> = {
|
||||
populate: deduplicate(config.relations ?? []),
|
||||
fields: config.select as string[],
|
||||
limit: config.take ?? 15,
|
||||
offset: config.skip ?? 0,
|
||||
limit:
|
||||
(Number.isSafeInteger(config.take) && config.take! >= 0) ||
|
||||
null === config.take
|
||||
? config.take ?? undefined
|
||||
: 15,
|
||||
offset:
|
||||
(Number.isSafeInteger(config.skip) && config.skip! >= 0) ||
|
||||
null === config.skip
|
||||
? config.skip ?? undefined
|
||||
: 0,
|
||||
}
|
||||
|
||||
if (config.order) {
|
||||
|
||||
Reference in New Issue
Block a user