GraphQL error
Afupe opened this issue · 2 comments
Hey!
I've tried to incorporate this project into my website and so far it's 'almost' working. There's couple of issues I'm facing and can't quite wrap my head around them. The first one is GraphQL error similar to this issue reported here: #193.
GraphQL error: Cannot query field "id" on type "CartItemToProductConnectionEdge".
GraphQL error: Cannot query field "databaseId" on type "CartItemToProductConnectionEdge".
GraphQL error: Cannot query field "name" on type "CartItemToProductConnectionEdge". Did you mean "node"?
GraphQL error: Cannot query field "description" on type "CartItemToProductConnectionEdge".
GraphQL error: Cannot query field "type" on type "CartItemToProductConnectionEdge".
GraphQL error: Cannot query field "onSale" on type "CartItemToProductConnectionEdge".
GraphQL error: Cannot query field "slug" on type "CartItemToProductConnectionEdge".
GraphQL error: Cannot query field "averageRating" on type "CartItemToProductConnectionEdge".
GraphQL error: Cannot query field "reviewCount" on type "CartItemToProductConnectionEdge".
GraphQL error: Cannot query field "image" on type "CartItemToProductConnectionEdge".
GraphQL error: Cannot query field "galleryImages" on type "CartItemToProductConnectionEdge".
GraphQL error: Cannot query field "id" on type "CartItemToProductVariationConnectionEdge".
GraphQL error: Cannot query field "databaseId" on type "CartItemToProductVariationConnectionEdge".
GraphQL error: Cannot query field "name" on type "CartItemToProductVariationConnectionEdge". Did you mean "node"?
GraphQL error: Cannot query field "description" on type "CartItemToProductVariationConnectionEdge".
GraphQL error: Cannot query field "type" on type "CartItemToProductVariationConnectionEdge".
GraphQL error: Cannot query field "onSale" on type "CartItemToProductVariationConnectionEdge".
GraphQL error: Cannot query field "price" on type "CartItemToProductVariationConnectionEdge".
GraphQL error: Cannot query field "regularPrice" on type "CartItemToProductVariationConnectionEdge".
GraphQL error: Cannot query field "salePrice" on type "CartItemToProductVariationConnectionEdge".
GraphQL error: Cannot query field "image" on type "CartItemToProductVariationConnectionEdge".
GraphQL error: Cannot query field "nodes" on type "VariationAttribute". Did you mean "name"?
I've installed all required plugins for my backend and also changed the .env.example to .env while changing the required constants. I'm willing to provide more information if you have any clue on how to debug this error.
The second error is something to do with my own setup. I'm building the site on live server (with shared hosting) and I've managed to get the blog portion of the site working correctly and I can access the individual blog posts etc. with their direct 'url':s but when trying to access pages connected to the store directly it gives me server error like this:
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
These might be some random noob errors, my apologies about that. It's my first time working with headless wordpress / woocommerce and nuxt.js, but I'm trying to learn as I go.
The site is currently online here and if you click there the "store" -link, you can see the errors I've reported. Can't give you direct link to the store page because well, that doesn't work right now. You can see the server error if you refresh the store page. The individual posts and "about" page are working and they can refreshed as normal (maybe this has something to do with my nuxt.config-file? hmm..) . Also "ADD TO CART" button on product page doesn't work.
ps. the navigation is a bit messy right now.
Check out https://github.com/w3bdesign/nuxtjs-woocommerce#troubleshooting
Essentially you need to doublecheck that the version of the plugins you are using matches what I used while developing this.
Try downgrading WP Woo GraphQL (wp-graphql-woocommerce) to version 0.61 and let me know how that goes.
For the second error, I am unsure about how to reproduce the error.
Either way I need more details about your setup in order to provide more assistance.
Oh sweet. My mistake, I should have read the instructions more carefully, ehm. That solved all of my problems that I've encountered so far, and now the routing works too and I can access the pages directly with no console errors. Can confirm that plugin version 0.6.2 of WP Woo GraphQL seems to work fine aswell.
Thanks for quick reply! :)