diff --git a/.changeset/silver-comics-give.md b/.changeset/silver-comics-give.md new file mode 100644 index 0000000000000..6eba5265c3d6b --- /dev/null +++ b/.changeset/silver-comics-give.md @@ -0,0 +1,5 @@ +--- +"@medusajs/medusa": patch +--- + +Fix/product variants filter diff --git a/packages/medusa/src/api/admin/products/validators.ts b/packages/medusa/src/api/admin/products/validators.ts index a45624cdd20ae..6c790219a4e71 100644 --- a/packages/medusa/src/api/admin/products/validators.ts +++ b/packages/medusa/src/api/admin/products/validators.ts @@ -41,7 +41,9 @@ export const AdminGetProductVariantsParams = createFindParams({ .merge(applyAndAndOrOperators(AdminGetProductVariantsParamsFields)) export const AdminGetProductsParamsDirectFields = z.object({ - variants: AdminGetProductVariantsParams.optional(), + variants: AdminGetProductVariantsParamsFields.merge( + applyAndAndOrOperators(AdminGetProductVariantsParamsFields) + ).optional(), status: statusEnum.array().optional(), })