https://github.com/armandphilippot/wp-graphql-gravatar
Adds a WP GraphQL field containing the Gravatar url of the comment author.
https://github.com/armandphilippot/wp-graphql-gravatar
graphql gravatar wordpress wordpress-plugin wpgraphql wpgraphql-plugin
Last synced: 29 days ago
JSON representation
Adds a WP GraphQL field containing the Gravatar url of the comment author.
- Host: GitHub
- URL: https://github.com/armandphilippot/wp-graphql-gravatar
- Owner: ArmandPhilippot
- License: gpl-2.0
- Created: 2021-12-04T22:12:10.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-04-12T09:56:23.000Z (about 2 months ago)
- Last Synced: 2026-04-12T11:23:08.584Z (about 2 months ago)
- Topics: graphql, gravatar, wordpress, wordpress-plugin, wpgraphql, wpgraphql-plugin
- Language: PHP
- Homepage:
- Size: 1.03 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# WP GraphQL Gravatar
This plugin adds a WP GraphQL field containing the Gravatar url of the comment author.
## Requirements
- [WP GraphQL](https://github.com/wp-graphql/wp-graphql)
## Description
This plugin allows you to retrieve the author Gravatar inside your comments. Since WP GraphQL does not expose the author email publicly (by default), the gravatar needs to be fetch earlier. The plugin uses a native WordPress function to get the avatar url and it adds it inside a `gravatarUrl` field.
**Query example:**
```graphql
query SinglePost($slug: String!) {
articleBy(slug: $slug) {
id
title
date
content
comments {
nodes {
id
date
content
author {
node {
gravatarUrl
name
url
}
}
}
}
}
}
```
## Installation
Download this repo, then put the plugin inside your `wp-content/plugins/` directory and activate it in your WordPress admin.
## License
This WordPress plugin is open-source and released under the [GPL 2.0 or later license](./LICENSE).