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
43fb2046
Commit
43fb2046
authored
Jan 17, 2020
by
Fabio Huser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose mentions_disabled via group GraphQL API
parent
bcf40275
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
0 deletions
+29
-0
app/graphql/types/group_type.rb
app/graphql/types/group_type.rb
+3
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+5
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+14
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+1
-0
spec/graphql/types/group_type_spec.rb
spec/graphql/types/group_type_spec.rb
+6
-0
No files found.
app/graphql/types/group_type.rb
View file @
43fb2046
...
...
@@ -17,6 +17,9 @@ module Types
group
.
avatar_url
(
only_path:
false
)
end
field
:mentions_disabled
,
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Indicates if a group is disabled from getting mentioned'
field
:parent
,
GroupType
,
null:
true
,
description:
'Parent group'
,
resolve:
->
(
obj
,
_args
,
_ctx
)
{
Gitlab
::
Graphql
::
Loaders
::
BatchModelLoader
.
new
(
Group
,
obj
.
parent_id
).
find
}
...
...
doc/api/graphql/reference/gitlab_schema.graphql
View file @
43fb2046
...
...
@@ -2594,6 +2594,11 @@ type Group {
"""
lfsEnabled
:
Boolean
"""
Indicates
if
a
group
is
disabled
from
getting
mentioned
"""
mentionsDisabled
:
Boolean
"""
Name
of
the
namespace
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
43fb2046
...
...
@@ -3460,6 +3460,20 @@
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"mentionsDisabled"
,
"description"
:
"Indicates if a group is disabled from getting mentioned"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"Boolean"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"name"
,
"description"
:
"Name of the namespace"
,
...
...
doc/api/graphql/reference/index.md
View file @
43fb2046
...
...
@@ -393,6 +393,7 @@ Autogenerated return type of EpicTreeReorder
|
`userPermissions`
| GroupPermissions! | Permissions for the current user on the resource |
|
`webUrl`
| String! | Web URL of the group |
|
`avatarUrl`
| String | Avatar URL of the group |
|
`mentionsDisabled`
| Boolean | Indicates if a group is disabled from getting mentioned |
|
`parent`
| Group | Parent group |
|
`epicsEnabled`
| Boolean | Indicates if Epics are enabled for namespace |
|
`groupTimelogsEnabled`
| Boolean | Indicates if Group timelogs are enabled for namespace |
...
...
spec/graphql/types/group_type_spec.rb
View file @
43fb2046
...
...
@@ -8,4 +8,10 @@ describe GitlabSchema.types['Group'] do
it
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'Group'
)
}
it
{
expect
(
described_class
).
to
require_graphql_authorizations
(
:read_group
)
}
it
'has the expected fields'
do
expected_fields
=
%w[web_url avatar_url mentions_disabled parent]
is_expected
.
to
include_graphql_fields
(
*
expected_fields
)
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