Skip to content

Products positions are not updated in GraphQL query result #30467

Closed
@magento-engcom-team

Description

@magento-engcom-team

Precondition

Use GET to submit GraphQL query in order for query result to be cached. see GraphQL Caching

Steps to reproduce

  1. Create at least 2 products
  2. Create category and assign products created in step.1 and save category
  3. Execute the query below
  4. Check that products are ordered correctly
  5. Change products positions in the category and save changes
  6. Execute the query below

Query

query getProducts { 
  products( 
    filter: {
      category_id: 
        { eq: "<category ID>" } 
    } 
    sort:
    	{position:ASC} 
  ) 
  { 
  total_count 
    items { 
      name 
      sku 
    } 
    page_info { 
      page_size 
      current_page 
    } 
  } 
}

(x) Actual result

Products positions are not updated.

(/) Expected result

Products positions are updated.

(i) Notice

This issue is reproducible only if GraphQL query result is cached. the cache is not invalidated when products positions changed within a category. However this works with regular category page (PLP).

Metadata

Metadata

Assignees

Labels

Mageconf_Contribution_DayPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneProject: GraphQLSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions