-
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
Input type of customizable option doesn't get returned through GraphQL #29302
Comments
Hi @drpayyne. 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. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @nrkapoor. Thank you for working on this issue.
|
Hi @dineshvb! 👋 |
@magento add to contributors team |
@magento I am working on this |
Hi @magento-engcom-team, why was neither the PR, nor the issue updated with the existence and the status of an internal issue and PR? This is counterproductive of having an open source repository... almost two months of the linked PR work is useless now? |
Preconditions
Github branches
magento2/2.4-develop
andarchitecture/master
Steps to reproduce
The GraphQL type
SelectedCustomizableOption
is used in multiple places across the Magento GraphQL modules to get the currently selected customizable option of a product through GraphQL. There are various field types for this such as text, textarea, select, multiselect, checkbox, etc. Currently, there's no way for a frontend using GraphQL to know how to render the SelectedCustomizableOption. Yes, the format varies according to different types, but the format is the same for input types of the same category. I believe there's no way to differentiate between a text and a textarea ofSelectedCustomizableOption
. Same with the different select input types.The associated resolver class does return the 'type of input' from Magento (ref: https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/QuoteGraphQl/Model/CartItem/DataProvider/CustomizableOption.php#L60), but the associated GraphQL schema does not define a field for the same (ref: https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/QuoteGraphQl/etc/schema.graphqls#L346) and hence the 'type of input' doesn't get returned.
Upon some searching, the GraphQL coverage docs did have the 'type of input' as a field in
SelectedCustomizableOption
a couple of months ago (ref: https://github.com/magento/architecture/blob/673438109bbf63d819e96c373ef7622206ff7f9b/design-documents/graph-ql/coverage/add-items-to-cart/AddSimpleProductToCart.graphqls#L59) until the new coverage docs (ref: https://github.com/magento/architecture/blob/master/design-documents/graph-ql/coverage/Cart.graphqls#L114) was matched according to the current GraphQL schema and was thus, removed.Expected result
Consistency.
Is the field
type
required to render the input type on the frontend?Actual result
The field
type
was removed from the QuoteGraphQl module in this commit: 1315577#diff-795a33fde881f18aba5165a5a8c7513fL317 and from the architecture coverage docs a couple months ago and now the code is inconsistent and causes confusion for developers.Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
The text was updated successfully, but these errors were encountered: