-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Summary
Version : 2.4.x
Cart GraphQl suppose to load only cart object (quote table) without items if it’s not requested as part of request params.
Right now unnecessarily Magento seems to be loading items from quote_item table (and further N+1 and Eav calls) even though it’s not present in the graphql query.
Expected Result
QuoteGraphQl --> cart Query to retrieve data only from Quote table without loading items and its product details
Examples
https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php#L87 << Quote Graphql calls repository here >>
https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Quote/Model/QuoteRepository.php#L160C20-L160C34 << Quote Repository calls LoadHandler >>
https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Quote/Model/QuoteRepository/LoadHandler.php#L46 << LoadHandler calls allVisibleItems >>
Benefits
- Major performance and load time benefit for simplified cart query
- Less no. of calls to Eav
Proposed solution
Based on request params in graphql query skip loading items objects and its product eav
Release note
No response
Triage and priority
- 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
Assignees
Labels
Type
Projects
Status