-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong fields selection while using fragments on GraphQL products query #26217
Comments
Hi @phoenix128. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @phoenix128 do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @phoenix128. Thank you for working on this issue.
|
Hi @phoenix128. Thank you for your report. The fix will be available with the upcoming 2.4.0 release. |
Magento does not return all the required information while using fragments on products query.
Preconditions (*)
Magento 2.3.x and Magento 2.4.x
Steps to reproduce (*)
Run a GraphQL query with fragments like the following one:
Expected result (*)
The expected result is to have the right image url and product price as well as other fields
Actual result (*)
The actual result always presents placeholders for images and zero price:
The problem seems to be located in
\Magento\CatalogGraphQl\Model\Resolver\Products\Query\FieldSelection::getProductsFieldSelection
for Magento 2.4 and\Magento\CatalogGraphQl\Model\Resolver\Product\ProductFieldsSelector::getProductFieldsFromInfo
for Magento 2.3 .Both methods do not analyze the defined fragments for the fields list and thus skipping their selection.
The text was updated successfully, but these errors were encountered: