Skip to content

GraphQl products query returns missing items on using category_id filter with in array #29720

Closed
@MeeGz

Description

@MeeGz

Preconditions (*)

  1. creating 2 categories as subcategories of the root one (test1 and test2)
  2. creating 2 products 1 for each created category (product1 for test1 and product2 for test2)

Steps to reproduce (*)

  1. using graphql client running this query
{
  products(filter: {category_id: {in: ["3","4"]}}) {
    total_count
    items {
      name
      categories {
        id
        name
      }
    }
  }
} 

Expected result (*)

  1. getting the total_count = 2
  2. getting 2 products into items property

Actual result (*)

  1. getting correct total_count = 2
  2. getting only 1 product of last value in in filter array (in this case category_id = 4)

Screen Shot 2020-08-23 at 12 29 30 PM

without applying any filters
Screen Shot 2020-08-23 at 12 39 39 PM


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions