Skip to content
Snippets Groups Projects
Unverified Commit 00850566 authored by Tetiana Chupryna's avatar Tetiana Chupryna
Browse files

Add bot to User type

Add check in GraphQL endpoint if user is a bot
parent 610d4f34
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -12,6 +12,9 @@ class UserType < BaseObject
 
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,
Loading
Loading
---
title: Add bot to User GraphQL Type
merge_request: 52933
author:
type: added
Loading
Loading
@@ -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.
"""
Loading
Loading
Loading
Loading
@@ -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.",
Loading
Loading
@@ -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. |
Loading
Loading
Loading
Loading
@@ -10,6 +10,7 @@
it 'has the expected fields' do
expected_fields = %w[
id
bot
user_permissions
snippets
name
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment