I'm using WPGraphQL with Gridsome. I am trying to query user avatar for post comments. Here is my query
comments(where: {order: ASC}) {
edges {
node {
id
author {
node {
__typename
... on User {
id
avatar {
url
}
}
}
}
}
}
}
This query works in WPGraphql IDE and returns avatar URL but I get an error when I try in Gridsome.
Error: Unknown type "User".
Any idea why this error? Thanks.