3

I am using magento 2.4.3-p2.

I have installed PWA studio with venia concept theme. I have followed adobe docs to install PWA studio on my local system.

I am facing an issue with the cart page. basically, I have added some products to the cart, the products are visible in the mini cart but when I click on "Edit Shopping Bag" the /cart page is showing "There are no items in your cart. ".

I have checked the dev tools -> console, i am getting "[GraphQL error]: Message: Cannot query field "errors" on type "CartItemInterface"., Location: [object Object], Path: undefined".

API : https://testpwa.magento.com:8530/graphql?query=query+GetCartDetails%28%24cartId

dev-tools-> network- > Fetch/xhr -> preview "errors: [{message: "Cannot query field "errors" on type "CartItemInterface".",…}]"

dev-tools-> network- > Fetch/xhr -> response "{"errors":[{"message":"Cannot query field "errors" on type "CartItemInterface".","extensions":{"category":"graphql"},"locations".

enter image description here

0

3 Answers 3

0

You will have to look at the request causing the error. It seems you are querying for the field "errors" in your request but that field has not been defined on CartItemInterface in schema.graphqls? Any field you include when querying for type MUST be defined in schema.

Open the network tab in chrome dev tools and click "Edit Shopping Bag" button, you should see the request that causes the error. You can then see what the request body contains.

Might also make sense to check the logs in var/log from Magento root - might have a stack trace for the exception.

0

Here answer

https://github.com/magento/magento2/issues/34546#issuecomment-1191236429

For fix

composer require magento/module-quote-graph-ql-pwa

php bin/magento module:enable Magento_QuoteGraphQlPwa

0

Just enable these modules by running below commands:

php bin/magento module:enable --clear-static-content Magento_EavGraphQlAux Magento_CatalogGraphQlAux Magento_PageBuilderPwa Magento_ReCaptchaGraphQlPwa Magento_ReCaptchaPwa Magento_SalesGraphQlAux Magento_UrlRewriteGraphQlPwa Magento_WeeeGraphQlAux

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.