magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.55k stars 9.32k forks source link

itemsV2 in GraphQl cart/customerCart query returns empty items when currentPage is greater than 1 #39139

Open mileandra opened 2 months ago

mileandra commented 2 months ago

Preconditions and environment

Steps to reproduce

  1. Create a new guest cart
  2. Add more individual items to the cart than defined pageSize
  3. Query itemsV2 on cart with existing currentPage > 1

Expected result

itemsV2.items contains items

Actual result

itemsV2.items returns an empty array

{
  "data": {
    "cart": {
      "itemsV2": {
        "items": [],
        "page_info": {
          "current_page": 2,
          "page_size": 10,
          "total_pages": 3
        },
        "total_count": 22
      }
    }
  }
}

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 2 months ago

Hi @mileandra. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 2 months ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 2 months ago

Hi @mileandra,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2024-09-04 at 13 31 41

itemsV2.items contains items

Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible.

Thanks.

mileandra commented 2 months ago

@engcom-Bravo the query is missing pagination information on the itemsV2

Example Query with more than 10 individual items in the cart:


query {
  cart(cart_id: "wXVN6U852tF9NCsWb6sMuduIekNboYor") {
    itemsV2(currentPage: 2, pageSize: 10) {
      items {
        uid
        quantity
      }
      page_info {
        current_page
        page_size
        total_pages
      } 
      total_count
    }
  }
}
mileandra commented 2 months ago

See example screenshot:

Bildschirmfoto 2024-09-04 um 10 18 59
engcom-Bravo commented 2 months ago

Hi @mileandra,

Thanks for your update.

We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.

Screenshot 2024-09-05 at 11 02 30

itemsV2.items returns an empty array

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 2 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12911 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 months ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.