WP Manifestindependent plugin directory
manifest / integrations / wp-graphql-gravatar

WP GraphQL Gravatar

Adds a WP GraphQL field containing the Gravatar url of the comment author.

by Armand Philippot · github.com/armandphilippot/wp-graphql-gravatar · website

1stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/armandphilippot/wp-graphql-gravatar/archive/refs/heads/main.zip

Readme

WP GraphQL Gravatar

This plugin adds a WP GraphQL field containing the Gravatar url of the comment author.

Requirements

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:

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.

Read the full README on GitHub →

Releases

TagPublished
v1.1.1 Dec 6, 2021
v1.1.0 Dec 6, 2021
v1.0.1 Dec 5, 2021
v1.0.0 Dec 5, 2021

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.