vendure-ecommerce/vendure

Collections return disabled products

Closed this issue · 1 comments

Describe the bug
Collections return disabled products.

To Reproduce
Steps to reproduce the behavior:

  1. Create product
  2. Disable product
  3. Create collection which connects to this product
  4. See disabled product on collection result

Expected behavior
A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • @vendure/core version: 3.0.5
  • Nodejs version: 22.8.0
  • Database (mysql/postgres etc): Postgres

Additional context
It's basically the same issue as 1213 but with products instead of product variants.

To retrieve the disabled products I've used this query

query($collectionId: ID) {
  collection(id: $collectionId) {
    id
    products {
      items {
        id
      }
    }
  }
}

Oops I didn't even know we made the products resolver ourselves... Our fault!