Commit a228db26 authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch '267140-add-user-bot-gql' into 'master'

Add bot to User GraphQL Type

See merge request gitlab-org/gitlab!52933
parents e8867a28 00850566
...@@ -12,6 +12,9 @@ module Types ...@@ -12,6 +12,9 @@ module Types
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the user.' description: 'ID of the user.'
field :bot, GraphQL::BOOLEAN_TYPE, null: false,
description: 'Indicates if the user is a bot.',
method: :bot?
field :username, GraphQL::STRING_TYPE, null: false, field :username, GraphQL::STRING_TYPE, null: false,
description: 'Username of the user. Unique within this instance of GitLab.' description: 'Username of the user. Unique within this instance of GitLab.'
field :name, GraphQL::STRING_TYPE, null: false, field :name, GraphQL::STRING_TYPE, null: false,
......
---
title: Add bot to User GraphQL Type
merge_request: 52933
author:
type: added
...@@ -27053,6 +27053,11 @@ type User { ...@@ -27053,6 +27053,11 @@ type User {
""" """
avatarUrl: String avatarUrl: String
"""
Indicates if the user is a bot.
"""
bot: Boolean!
""" """
User email. Deprecated in 13.7: Use public_email. User email. Deprecated in 13.7: Use public_email.
""" """
......
...@@ -77878,6 +77878,24 @@ ...@@ -77878,6 +77878,24 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "bot",
"description": "Indicates if the user is a bot.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "email", "name": "email",
"description": "User email. Deprecated in 13.7: Use public_email.", "description": "User email. Deprecated in 13.7: Use public_email.",
...@@ -4031,6 +4031,7 @@ Autogenerated return type of UpdateSnippet. ...@@ -4031,6 +4031,7 @@ Autogenerated return type of UpdateSnippet.
| `assignedMergeRequests` | MergeRequestConnection | Merge Requests assigned to the user. | | `assignedMergeRequests` | MergeRequestConnection | Merge Requests assigned to the user. |
| `authoredMergeRequests` | MergeRequestConnection | Merge Requests authored by the user. | | `authoredMergeRequests` | MergeRequestConnection | Merge Requests authored by the user. |
| `avatarUrl` | String | URL of the user's avatar. | | `avatarUrl` | String | URL of the user's avatar. |
| `bot` | Boolean! | Indicates if the user is a bot. |
| `email` **{warning-solid}** | String | **Deprecated:** Use public_email. Deprecated in 13.7. | | `email` **{warning-solid}** | String | **Deprecated:** Use public_email. Deprecated in 13.7. |
| `groupCount` | Int | Group count for the user. Available only when feature flag `user_group_counts` is enabled. | | `groupCount` | Int | Group count for the user. Available only when feature flag `user_group_counts` is enabled. |
| `groupMemberships` | GroupMemberConnection | Group memberships of the user. | | `groupMemberships` | GroupMemberConnection | Group memberships of the user. |
......
...@@ -10,6 +10,7 @@ RSpec.describe GitlabSchema.types['User'] do ...@@ -10,6 +10,7 @@ RSpec.describe GitlabSchema.types['User'] do
it 'has the expected fields' do it 'has the expected fields' do
expected_fields = %w[ expected_fields = %w[
id id
bot
user_permissions user_permissions
snippets snippets
name name
......
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