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 "fashion_color" #626
Comments
I have the same issue |
@aliaathil this is the GraphQL query validation which runs with This happens because you're running against a Magento instance that has no Venia sample data and because the Venia GraphQL queries for product options fashion_color and fashion_size are hardcoded. Comment out fashion_color and fashion_size in both |
@ennostuurman thanks |
yw @aliaathil glad it helped and thanks for closing the issue . |
This is closed, but this happens with the default 2.3 and pwa repos I downloaded yesterday... |
@travisdetert what do you mean with default 2.3 . Is that a default M2.3 instance (with default Magento sample data) or the PWA MAGENTO_BACKEND_URL="https://release-dev-rxvv2iq-zddsyhrdimyra.us-4.magentosite.cloud/" (see packages/venia-concept/.env.dist ) with Venia sample data? |
I'm bumping into the same issue, while the attribute The module |
@ennostuurman that is correct, I followed the install directions per the docs with the newly downloaded packages (at the time), I had to run install a few times to get it to install the sample data, but when that did seem to add products, I saw different results than the online demo. Not saying it's impossible that I didn't miss a step, but I am pretty sure I followed it line for line. Commenting out those fields got me closer to what looked like a working site, but was missing various images or products in comparison. |
A module - say interface ProductInterface {
fashion_color: String @doc(description: "Fashion color.")
} This theoretically should be it. However, I'm still struggling with it. |
@jissereitsma I think you have not installed sample data or had some errors in while installing |
I actually found that files in my |
I commented "fashion_color" and "fashion_size" then build was running successfully but in PDP( product detailed page ) page item color and size, unable to add to the cart. |
hey @cnu115 if you're running against a Magento instance with Venia sample data then commenting out the variants in the GraphQL query will indeed error when trying to add products to cart. So are you running Magento PWA Studio against a local Magento instance with Venia data? If that's the case does your local PWA Studio also have these issues with the default configured MAGENTO_BACKEND_URL (see env.dist) ? |
Hi @ennostuurman I am not running Venia sample data, I am running Magento sample data. For default configured MAGENTO_BACKEND_URL working fine. For Magento sample data it's throwing an error item is undefined. What about store having simple products as well as configurable products ?? |
Hello friends, I need your help. I got an error "failed: ServerParseError: Unexpected token < in JSON at position 0\n at makePromise.then.catch.e". while i run yarn run watch:venia Thanks in advance. |
For configurable products, the options of type swatch need to be maintained in the separate model file. In venia, this is done in the following path so the fashion_color won't be available in magento backend and it might be the cause for this issue. |
This issue is a:
Environment
node -v
)npm -v
)Description
Using environment variables from .env
Errors found!
/var/www/html/magento223/pwa-studio/packages/venia-concept/src/queries/getProductDetail.graphql
37:25 error Cannot query field "fashion_color" on type "SimpleProduct" graphql/template-strings
/var/www/html/magento223/pwa-studio/packages/venia-concept/src/RootComponents/Product/Product.js
48:29 error Cannot query field "fashion_color" on type "SimpleProduct" graphql/template-strings
✖ 2 problems (2 errors, 0 warnings)
These errors may indicate:
Use GraphiQL or another schema exploration tool on the Magento store to learn more.
Expected result:
run pwa
Possible solutions:
The text was updated successfully, but these errors were encountered: