Skip to content

GraphQL: Add notificationEmail field to GroupMembers

Ryan Cobb requested to merge rc/graphql_notification_email into master

What does this MR do and why?

Issue: customers-gitlab-com#4009 (closed)

CustomersDot needs the ability to fetch a User's Group notification email address. We need this so we can send billing related emails to all group owners. This adds that ability via GraphQL by utilizing the existing GroupMember type.

example query

{
  group(fullPath: "Flightjs") {
    name
    groupMembers {
      nodes {
        notificationEmail
        accessLevel {
          stringValue
        }
      }
    }
  }
}

example response

{
  "data": {
    "group": {
      "name": "Flightjs",
      "groupMembers": {
        "nodes": [
          {
            "notificationEmail": "berniece@blick.ca",
            "accessLevel": {
              "stringValue": "MAINTAINER"
            }
          },
          {
            "notificationEmail": "hollis_schumm@leffler.us",
            "accessLevel": {
              "stringValue": "GUEST"
            }
          },
          {
            "notificationEmail": "gaynell_murphy@mayer.co.uk",
            "accessLevel": {
              "stringValue": "MAINTAINER"
            }
          },
          {
            "notificationEmail": "madeleine_farrell@lebsack.co.uk",
            "accessLevel": {
              "stringValue": "GUEST"
            }
          },
          {
            "notificationEmail": "admin@example.com",
            "accessLevel": {
              "stringValue": "OWNER"
            }
          }
        ]
      }
    }
  }
}

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Ryan Cobb

Merge request reports

Loading