Commit 17bd7b60 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'add-public-email-to-graphql-user' into 'master'

Expose public email for users in GraphQL

See merge request gitlab-org/gitlab!48468
parents 46ea58a0 d54b2edb
......@@ -20,6 +20,8 @@ module Types
description: 'State of the user'
field :email, GraphQL::STRING_TYPE, null: true,
description: 'User email'
field :public_email, GraphQL::STRING_TYPE, null: true,
description: "User's public email"
field :avatar_url, GraphQL::STRING_TYPE, null: true,
description: "URL of the user's avatar"
field :web_url, GraphQL::STRING_TYPE, null: false,
......
---
title: Expose public email field for user in GraphQL
merge_request: 48468
author:
type: changed
......@@ -23369,6 +23369,11 @@ type User {
last: Int
): ProjectMemberConnection
"""
User's public email
"""
publicEmail: String
"""
Snippets authored by the user
"""
......
......@@ -67886,6 +67886,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "publicEmail",
"description": "User's public email",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "snippets",
"description": "Snippets authored by the user",
......@@ -3494,6 +3494,7 @@ Autogenerated return type of UpdateSnippet.
| `location` | String | The location of the user. |
| `name` | String! | Human-readable name of the user |
| `projectMemberships` | ProjectMemberConnection | Project memberships of the user |
| `publicEmail` | String | User's public email |
| `snippets` | SnippetConnection | Snippets authored by the user |
| `starredProjects` | ProjectConnection | Projects starred by the user |
| `state` | UserState! | State of the user |
......
......@@ -15,6 +15,7 @@ RSpec.describe GitlabSchema.types['User'] do
name
username
email
publicEmail
avatarUrl
webUrl
webPath
......
......@@ -82,7 +82,8 @@ RSpec.describe 'getting user information' do
'username' => presenter.username,
'webUrl' => presenter.web_url,
'avatarUrl' => presenter.avatar_url,
'email' => presenter.email
'email' => presenter.email,
'publicEmail' => presenter.public_email
))
expect(graphql_data['user']['status']).to match(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment