Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9df63f66
Commit
9df63f66
authored
Feb 24, 2021
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the callouts field to the user type
Adds the callouts field to the user GraphQL type
parent
695def36
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
0 deletions
+54
-0
app/graphql/types/user_type.rb
app/graphql/types/user_type.rb
+4
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+41
-0
spec/graphql/types/user_type_spec.rb
spec/graphql/types/user_type_spec.rb
+9
-0
No files found.
app/graphql/types/user_type.rb
View file @
9df63f66
...
@@ -67,5 +67,9 @@ module Types
...
@@ -67,5 +67,9 @@ module Types
null:
true
,
null:
true
,
description:
'Snippets authored by the user.'
,
description:
'Snippets authored by the user.'
,
resolver:
Resolvers
::
Users
::
SnippetsResolver
resolver:
Resolvers
::
Users
::
SnippetsResolver
field
:callouts
,
Types
::
UserCalloutType
.
connection_type
,
null:
true
,
description:
'User callouts that belong to the user.'
end
end
end
end
doc/api/graphql/reference/index.md
View file @
9df63f66
...
@@ -4503,6 +4503,7 @@ Represents a recorded measurement (object count) for the Admins.
...
@@ -4503,6 +4503,7 @@ Represents a recorded measurement (object count) for the Admins.
|
`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. |
|
`bot`
| Boolean! | Indicates if the user is a bot. |
|
`callouts`
| UserCalloutConnection | User callouts that belong to the user. |
|
`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. |
...
@@ -4522,6 +4523,13 @@ Represents a recorded measurement (object count) for the Admins.
...
@@ -4522,6 +4523,13 @@ Represents a recorded measurement (object count) for the Admins.
|
`webPath`
| String! | Web path of the user. |
|
`webPath`
| String! | Web path of the user. |
|
`webUrl`
| String! | Web URL of the user. |
|
`webUrl`
| String! | Web URL of the user. |
### `UserCallout`
| Field | Type | Description |
| ----- | ---- | ----------- |
|
`dismissedAt`
| Time | Date when the callout was dismissed. |
|
`featureName`
| UserCalloutFeatureNameEnum! | Name of the feature that the callout is for. |
### `UserPermissions`
### `UserPermissions`
| Field | Type | Description |
| Field | Type | Description |
...
@@ -5918,6 +5926,39 @@ State of a test report.
...
@@ -5918,6 +5926,39 @@ State of a test report.
|
`personal`
| |
|
`personal`
| |
|
`project`
| |
|
`project`
| |
### `UserCalloutFeatureNameEnum`
Name of the feature that the callout is for.
| Value | Description |
| ----- | ----------- |
|
`ACCOUNT_RECOVERY_REGULAR_CHECK`
| |
|
`ACTIVE_USER_COUNT_THRESHOLD`
| |
|
`ADMIN_INTEGRATIONS_MOVED`
| |
|
`BUY_PIPELINE_MINUTES_NOTIFICATION_DOT`
| |
|
`CANARY_DEPLOYMENT`
| |
|
`CLUSTER_SECURITY_WARNING`
| |
|
`CUSTOMIZE_HOMEPAGE`
| |
|
`EOA_BRONZE_PLAN_BANNER`
| |
|
`FEATURE_FLAGS_NEW_VERSION`
| |
|
`GCP_SIGNUP_OFFER`
| |
|
`GEO_ENABLE_HASHED_STORAGE`
| |
|
`GEO_MIGRATE_HASHED_STORAGE`
| |
|
`GKE_CLUSTER_INTEGRATION`
| |
|
`GOLD_TRIAL_BILLINGS`
| |
|
`NEW_USER_SIGNUPS_CAP_REACHED`
| |
|
`PERSONAL_ACCESS_TOKEN_EXPIRY`
| |
|
`REGISTRATION_ENABLED_CALLOUT`
| |
|
`SERVICE_TEMPLATES_DEPRECATED`
| |
|
`SUGGEST_PIPELINE`
| |
|
`SUGGEST_POPOVER_DISMISSED`
| |
|
`TABS_POSITION_HIGHLIGHT`
| |
|
`THREAT_MONITORING_INFO`
| |
|
`ULTIMATE_TRIAL`
| |
|
`UNFINISHED_TAG_CLEANUP_CALLOUT`
| |
|
`WEBHOOKS_MOVED`
| |
|
`WEB_IDE_ALERT_DISMISSED`
| |
### `UserState`
### `UserState`
Possible states of a user.
Possible states of a user.
...
...
spec/graphql/types/user_type_spec.rb
View file @
9df63f66
...
@@ -31,6 +31,7 @@ RSpec.describe GitlabSchema.types['User'] do
...
@@ -31,6 +31,7 @@ RSpec.describe GitlabSchema.types['User'] do
groupCount
groupCount
projectMemberships
projectMemberships
starredProjects
starredProjects
callouts
]
]
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
...
@@ -44,4 +45,12 @@ RSpec.describe GitlabSchema.types['User'] do
...
@@ -44,4 +45,12 @@ RSpec.describe GitlabSchema.types['User'] do
is_expected
.
to
have_graphql_resolver
(
Resolvers
::
Users
::
SnippetsResolver
)
is_expected
.
to
have_graphql_resolver
(
Resolvers
::
Users
::
SnippetsResolver
)
end
end
end
end
describe
'callouts field'
do
subject
{
described_class
.
fields
[
'callouts'
]
}
it
'returns user callouts'
do
is_expected
.
to
have_graphql_type
(
Types
::
UserCalloutType
.
connection_type
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment