-
Notifications
You must be signed in to change notification settings - Fork 466
Closed
Closed
Copy link
Labels
component: queryRelating to GraphQL QueriesRelating to GraphQL Queriesobject type: userRelating to the User TypeRelating to the User Typetype: bugIssue that causes incorrect or unexpected behaviorIssue that causes incorrect or unexpected behavior
Description
Description
When avatar display is disabled in WordPress under Settings > Discussion, WPGraphQL still provides the avatar URL in responses at viewer.avatar.url.
For comparison, the WP REST API does not include the avatar URLs in responses when this setting is disabled.
Screenshot of setting being referenced:

Example query:
query NewQuery {
viewer {
avatar {
url
}
}
}
Output from example query:
{
"data": {
"viewer": {
"avatar": {
"url": "http://1.gravatar.com/avatar/729ae85bf62b9917e93538db2f2688ca?s=96&d=mm&r=g"
}
}
}
}
Steps to reproduce
- Go to Settings > Discussions in wp-admin
- Ensure the "Show Avatars" checkbox is NOT checked and save the settings
- Do the above example query
- See avatar URLs in response
Additional context
No response
WPGraphQL Version
1.21.0
WordPress Version
6.4.3
PHP Version
8.1.23
Additional environment details
No response
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have disabled ALL plugins except for WPGraphQL.
- Yes
- My issue is with compatibility with a specific WordPress plugin, and I have listed all my installed plugins (and version info) above.
Metadata
Metadata
Assignees
Labels
component: queryRelating to GraphQL QueriesRelating to GraphQL Queriesobject type: userRelating to the User TypeRelating to the User Typetype: bugIssue that causes incorrect or unexpected behaviorIssue that causes incorrect or unexpected behavior
Type
Projects
Status
✅ Done