Commit 00850566 authored by Tetiana Chupryna's avatar Tetiana Chupryna

Add bot to User type

Add check in GraphQL endpoint if user is a bot
parent 610d4f34
......@@ -12,6 +12,9 @@ module Types
field :id, GraphQL::ID_TYPE, null: false,
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,
description: 'Username of the user. Unique within this instance of GitLab.'
field :name, GraphQL::STRING_TYPE, null: false,
......
---
title: Add bot to User GraphQL Type
merge_request: 52933
author:
type: added
......@@ -26980,6 +26980,11 @@ type User {
"""
avatarUrl: String
"""
Indicates if the user is a bot.
"""
bot: Boolean!
"""
User email. Deprecated in 13.7: Use public_email.
"""
......
......@@ -77620,6 +77620,24 @@
"isDeprecated": false,
"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",
"description": "User email. Deprecated in 13.7: Use public_email.",
......@@ -4010,6 +4010,7 @@ Autogenerated return type of UpdateSnippet.
| `assignedMergeRequests` | MergeRequestConnection | Merge Requests assigned to the user. |
| `authoredMergeRequests` | MergeRequestConnection | Merge Requests authored by the user. |
| `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. |
| `groupCount` | Int | Group count for the user. Available only when feature flag `user_group_counts` is enabled. |
| `groupMemberships` | GroupMemberConnection | Group memberships of the user. |
......
......@@ -10,6 +10,7 @@ RSpec.describe GitlabSchema.types['User'] do
it 'has the expected fields' do
expected_fields = %w[
id
bot
user_permissions
snippets
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