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:
Philip Korsholm
2023-11-27 10:17:42 +00:00
committed by GitHub
parent faa528159d
commit 18afe0b9ad
19 changed files with 103 additions and 45 deletions
+2 -2
View File
@@ -46,11 +46,11 @@ export function buildQuery<TWhereKeys extends object, TEntity = unknown>(
}
if ("skip" in config) {
;(query as FindManyOptions<TEntity>).skip = config.skip
;(query as FindManyOptions<TEntity>).skip = config.skip ?? undefined
}
if ("take" in config) {
;(query as FindManyOptions<TEntity>).take = config.take
;(query as FindManyOptions<TEntity>).take = config.take ?? undefined
}
if (config.relations) {