From 712c4496ce3cbf00e3ae4f1e9e1f94ffbe8a53bd Mon Sep 17 00:00:00 2001 From: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:50:42 +0000 Subject: [PATCH] fix(medusa): Update default relations in admin for list-product from module --- .changeset/lemon-poems-join.md | 5 +++++ .../medusa/src/api/routes/admin/products/index.ts | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .changeset/lemon-poems-join.md diff --git a/.changeset/lemon-poems-join.md b/.changeset/lemon-poems-join.md new file mode 100644 index 0000000000..80f13ad53e --- /dev/null +++ b/.changeset/lemon-poems-join.md @@ -0,0 +1,5 @@ +--- +"@medusajs/medusa": patch +--- + +fix(medusa): update default admin query with product categories diff --git a/packages/medusa/src/api/routes/admin/products/index.ts b/packages/medusa/src/api/routes/admin/products/index.ts index 68391429b6..1645a74766 100644 --- a/packages/medusa/src/api/routes/admin/products/index.ts +++ b/packages/medusa/src/api/routes/admin/products/index.ts @@ -159,6 +159,18 @@ export const defaultAdminProductRemoteQueryObject = { fields: ["title", "handle", "id", "created_at", "updated_at", "deleted_at"], }, + categories: { + fields: [ + "id", + "name", + "description", + "handle", + "is_active", + "is_internal", + "parent_category_id", + ], + }, + options: { fields: [ "id", @@ -503,4 +515,3 @@ export * from "./set-metadata" export * from "./update-option" export * from "./update-product" export * from "./update-variant" -