Skip to content
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

Cannot query field "applied_gift_cards" on type "Cart". Cannot query field "gift_options" on type "CartPrices #4266

Open
RanayCodes opened this issue May 15, 2024 · 4 comments
Assignees
Labels
bug Something isn't working in progress Issue: Needs Update Additional information is require, waiting for response Progress: ready for grooming

Comments

@RanayCodes
Copy link

Preconditions and environment

Magento version: v2.4.5 Community
Pwa Studio v14.0.0

To reproduce

Steps to reproduce the behavior:

  1. Go to Cart Page and Checkout

Expected behavior

Cart page and checkout should be working fine

Screenshots

Screenshot from 2024-05-15 18-24-50

Screenshot from 2024-05-15 18-32-35

Actual Results

Cart page is blank and not allow to complete checkout

The error logs in the Magento var/log/:

GraphQL (1:1655)
1: query GetCartDetails($cartId:String!){cart(cart_id:$cartId){id ...CartPageFragment __typename}}fragment CartPageFragment on Cart{id total_quantity ...AppliedCouponsFragment ...GiftCardFragment ...ProductListingFragment ...PriceSummaryFragment __typename}fragment AppliedCouponsFragment on Cart{id applied_coupons{code __typename}__typename}fragment GiftCardFragment on Cart{applied_gift_cards{code current_balance{currency value __typename}__typename}id __typename}fragment ProductListingFragment on Cart{id items{uid product{uid name sku url_key thumbnail{url __typename}small_image{url __typename}stock_status ...on ConfigurableProduct{variants{attributes{uid code value_index __typename}product{uid stock_status small_image{url __typename}__typename}__typename}__typename}__typename}prices{price{currency value __typename}row_total{value __typename}total_item_discount{value __typename}__typename}quantity errors{code message __typename}...on ConfigurableCartItem{configurable_options{id configurable_product_option_uid option_label configurable_product_option_value_uid value_label value_id __typename}__typename}__typename}__typename}fragment PriceSummaryFragment on Cart{id items{uid quantity __typename}...ShippingSummaryFragment prices{...TaxSummaryFragment ...DiscountSummaryFragment ...GrandTotalFragment subtotal_excluding_tax{currency value __typename}subtotal_including_tax{currency value __typename}__typename}...GiftCardSummaryFragment ...GiftOptionsSummaryFragment __typename}fragment DiscountSummaryFragment on CartPrices{discounts{amount{currency value __typename}label __typename}__typename}fragment GiftCardSummaryFragment on Cart{id applied_gift_cards{code applied_balance{value currency __typename}__typename}__typename}fragment GiftOptionsSummaryFragment on Cart{id prices{gift_options{printed_card{value currency __typename}__typename}__typename}__typename}fragment GrandTotalFragment on CartPrices{grand_total{currency value __typename}__typename}fragment ShippingSummaryFragment on Cart{id shipping_addresses{selected_shipping_method{amount{currency value __typename}__typename}street __typename}__typename}fragment TaxSummaryFragment on CartPrices{applied_taxes{amount{currency value __typename}__typename}__typename}
^
[] []
[2024-05-15T13:16:08.745883+00:00] main.ERROR: Cannot query field "gift_options" on type "CartPrices".

GraphQL (1:1797)
1: query GetCartDetails($cartId:String!){cart(cart_id:$cartId){id ...CartPageFragment __typename}}fragment CartPageFragment on Cart{id total_quantity ...AppliedCouponsFragment ...GiftCardFragment ...ProductListingFragment ...PriceSummaryFragment __typename}fragment AppliedCouponsFragment on Cart{id applied_coupons{code __typename}__typename}fragment GiftCardFragment on Cart{applied_gift_cards{code current_balance{currency value __typename}__typename}id __typename}fragment ProductListingFragment on Cart{id items{uid product{uid name sku url_key thumbnail{url __typename}small_image{url __typename}stock_status ...on ConfigurableProduct{variants{attributes{uid code value_index __typename}product{uid stock_status small_image{url __typename}__typename}__typename}__typename}__typename}prices{price{currency value __typename}row_total{value __typename}total_item_discount{value __typename}__typename}quantity errors{code message __typename}...on ConfigurableCartItem{configurable_options{id configurable_product_option_uid option_label configurable_product_option_value_uid value_label value_id __typename}__typename}__typename}__typename}fragment PriceSummaryFragment on Cart{id items{uid quantity __typename}...ShippingSummaryFragment prices{...TaxSummaryFragment ...DiscountSummaryFragment ...GrandTotalFragment subtotal_excluding_tax{currency value __typename}subtotal_including_tax{currency value __typename}__typename}...GiftCardSummaryFragment ...GiftOptionsSummaryFragment __typename}fragment DiscountSummaryFragment on CartPrices{discounts{amount{currency value __typename}label __typename}__typename}fragment GiftCardSummaryFragment on Cart{id applied_gift_cards{code applied_balance{value currency __typename}__typename}__typename}fragment GiftOptionsSummaryFragment on Cart{id prices{gift_options{printed_card{value currency __typename}__typename}__typename}__typename}fragment GrandTotalFragment on CartPrices{grand_total{currency value __typename}__typename}fragment ShippingSummaryFragment on Cart{id shipping_addresses{selected_shipping_method{amount{currency value __typename}__typename}street __typename}__typename}fragment TaxSummaryFragment on CartPrices{applied_taxes{amount{currency value __typename}__typename}__typename}

@RanayCodes RanayCodes added the bug Something isn't working label May 15, 2024
Copy link

m2-assistant bot commented May 15, 2024

Hi @RanayCodes. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

@glo82145
Copy link
Collaborator

@adobe export issue to JIRA project PWA as Bug

@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/PWA-3366 is successfully created for this GitHub issue.

@del22123
Copy link
Collaborator

del22123 commented Oct 3, 2024

@RanayCodes
Issue reoccurs in Magento v2.4.5 CE and PWA Studio v14.0.0

Root cause: MAGENTO_BACKEND_EDITION misconfiguration in PWA .env file.
By default this config will be set to AC (Adobe commerce) which will result in graphql conflicts

Fix: The MAGENTO_BACKEND_EDITION value should be set as MOS (Magento Open Source) if the Magento is open source edition.

Configuration screenshot:
Screenshot 2024-10-03 at 3 02 17 PM

Cart Screenshot:
Screenshot 2024-10-03 at 4 18 03 PM

@del22123 del22123 added Progress: changes requested Issue: Needs Update Additional information is require, waiting for response and removed Progress: changes requested labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress Issue: Needs Update Additional information is require, waiting for response Progress: ready for grooming
Projects
None yet
Development

No branches or pull requests

4 participants