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

Single product pages don't work #24

Closed
w3bdesign opened this issue May 19, 2020 · 3 comments
Closed

Single product pages don't work #24

w3bdesign opened this issue May 19, 2020 · 3 comments

Comments

@w3bdesign
Copy link

I am getting "An unexpected error has occurred."

Then if I try to refresh I get a "500 Internal Server Error."

Checking the browser console I see:

Error: "GraphQL error: Cannot query field "productBy" on type "RootQuery". Did you mean "product", "products", "productTag", "productType", or "postBy"?"

@achatainga
Copy link

I am having same issue atm

@achatainga
Copy link

For anyone encountering this Error: "GraphQL error: Cannot query field "productBy" on type "RootQuery". Did you mean "product", "products", "productTag", "productType", or "postBy"?"

I believe productId is deprecated so databaseid instead of delete it all together

@w3bdesign
Copy link
Author

For anyone encountering this Error: "GraphQL error: Cannot query field "productBy" on type "RootQuery". Did you mean "product", "products", "productTag", "productType", or "postBy"?"

I believe productId is deprecated so databaseid instead of delete it all together

@achatainga

There has been some breaking changes to the WP Woo GraphQL plugin recently, where you have to specify the type of the ID you are using.

Feel free to take a look at my GraphQL queries in my repository where it is currently working:

https://github.com/w3bdesign/nextjs-woocommerce/blob/master/utils/gql/GQL_QUERIES.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants