-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
On AllWpPost, it's not possible to get a comment author's name #30311
Comments
Hi @tharsheblows ! Thanks for reporting this. I have an idea what the problem is but I'll have to try to reproduce first. Are you able to share a reproduction /graphql endpoint I can use to confirm? |
@TylerBarnes Apologies if I'm misunderstanding what you're asking for! If you use your starter theme (using updated version of gatsby-source-wordpress-experimental: "^2.1.1") and then the following as the query in src/templates/single/Post.js with a url of https://idontthink.wpenine.com/graphql you'll see it in the wild so to speak and you can use that for testing also. Did you want that url? I have it set up with wp-gatsby at the moment but usually use gatsby-source-graphql so will have to switch it back (?? do I? [edit: yes, I do, I can't use gatsby-source-graphql with wp-gatsby activated on the site]) if I actually write a blog post. Unlikely, admittedly. You can also see it on any install of WP with a comment (the out of the box install has one! :) )
|
@tharsheblows - were you able to resolve this issue? I am facing the same the error. |
@amooreTO I'm working on a fix this very moment :) |
I have a canary with a possible solution here To get it to work you need to exclude Commenter.databaseId to prevent WPGraphQL errors that cause the author to return null. In your gatsby-config.js plugin options for gatsby-source-wordpress add this:
Once that linked issue is fixed in WPGraphQL and this PR is merged/released #30358 it will work! |
I'm trying this query on my localhost's graphiql instance using:
v2.1.3 of this
v0.15.0 of the wp-graphql plugin
v0.5.4 of wp-gatsby plugin
with the starter theme here (but with an updated version of this 😊) https://github.com/TylerBarnes/using-gatsby-source-wordpress-experimental
I can't get to the author's name for the comments. This is an example of the type of query I'm running:
which is returning this error for comments.author.node.name (the rest is correct):
If I pick up a comment id and use that in the following, it also gives the same error:
The text was updated successfully, but these errors were encountered: