Expose public email for users in GraphQL
What does this MR do?
This is in the REST API: https://docs.gitlab.com/ee/api/users.html#for-user
But until this MR, wasn't in GraphQL. As requested by a customer in https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/670#note_449149917.
For gitlab-com/gl-infra/scalability#686 (closed).
{
currentUser {
email
publicEmail
}
}
If a user has no public email:
{
"data": {
"currentUser": {
"email": "admin@example.com",
"publicEmail": ""
}
}
}
And if they do:
{
"data": {
"currentUser": {
"email": "admin@example.com",
"publicEmail": "foo@example.com"
}
}
}