Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS Client returns empty list when searching by Tag Values #7364

Open
DoubleOTheven opened this issue May 18, 2024 · 0 comments
Open

JS Client returns empty list when searching by Tag Values #7364

DoubleOTheven opened this issue May 18, 2024 · 0 comments

Comments

@DoubleOTheven
Copy link

DoubleOTheven commented May 18, 2024

Bug report

Describe the bug

medusaClient.product.list({ tags: ['shirts'] }) returns an empty list when the product tags exist and are assigned to active products. The documentaion states that filtering by tag values will retrieve products, however this does not work. It DOES work if you use the tag ids instead of the tag values.

System information

Medusa version (including plugins): "@medusajs/product": "1.20.6"&"@medusajs/medusa-js": "^6.1.8"`
Node.js version: 20
Database: PG
Operating system: OSX
Browser (if relevant): --

Steps to reproduce the behavior

  1. Create Products with Tags
  2. Search for products using the medusa client: client.products.list({ tags: ['your-tag'] }); -> Returns an EMPTY LIST
  3. Search for products with no params: client.products.list(); -> Returns products with the tags present in response

Expected behavior

Filtering by tag value should return products that have those tags. Passing in tag ids should not.

@DoubleOTheven DoubleOTheven changed the title JS Client returns empty list when searching by Tags JS Client returns empty list when searching by Tag Values May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant