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
6dd5eaad
Commit
6dd5eaad
authored
Jan 22, 2020
by
Fabio Huser
Committed by
Sean McGivern
Jan 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backfill group type in GraphQL API
parent
49d44e93
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
172 additions
and
1 deletion
+172
-1
app/graphql/types/group_type.rb
app/graphql/types/group_type.rb
+19
-0
changelogs/unreleased/feat-backfill-group-graphql-api.yml
changelogs/unreleased/feat-backfill-group-graphql-api.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+35
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+98
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+7
-0
spec/graphql/types/group_type_spec.rb
spec/graphql/types/group_type_spec.rb
+8
-1
No files found.
app/graphql/types/group_type.rb
View file @
6dd5eaad
...
...
@@ -17,6 +17,25 @@ module Types
group
.
avatar_url
(
only_path:
false
)
end
field
:share_with_group_lock
,
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Indicates if sharing a project with another group within this group is prevented'
field
:project_creation_level
,
GraphQL
::
STRING_TYPE
,
null:
true
,
method: :project_creation_level_str
,
description:
'The permission level required to create projects in the group'
field
:subgroup_creation_level
,
GraphQL
::
STRING_TYPE
,
null:
true
,
method: :subgroup_creation_level_str
,
description:
'The permission level required to create subgroups within the group'
field
:require_two_factor_authentication
,
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Indicates if all users in this group are required to set up two-factor authentication'
field
:two_factor_grace_period
,
GraphQL
::
INT_TYPE
,
null:
true
,
description:
'Time before two-factor authentication is enforced'
field
:auto_devops_enabled
,
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Indicates whether Auto DevOps is enabled for all projects within this group'
field
:emails_disabled
,
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Indicates if a group has email notifications disabled'
field
:mentions_disabled
,
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Indicates if a group is disabled from getting mentioned'
...
...
changelogs/unreleased/feat-backfill-group-graphql-api.yml
0 → 100644
View file @
6dd5eaad
---
title
:
Backfill missing GraphQL API Group type properties
merge_request
:
23389
author
:
Fabio Huser
type
:
added
doc/api/graphql/reference/gitlab_schema.graphql
View file @
6dd5eaad
...
...
@@ -2434,6 +2434,11 @@ type GrafanaIntegration {
}
type
Group
{
"""
Indicates
whether
Auto
DevOps
is
enabled
for
all
projects
within
this
group
"""
autoDevopsEnabled
:
Boolean
"""
Avatar
URL
of
the
group
"""
...
...
@@ -2449,6 +2454,11 @@ type Group {
"""
descriptionHtml
:
String
"""
Indicates
if
a
group
has
email
notifications
disabled
"""
emailsDisabled
:
Boolean
"""
Find
a
single
epic
"""
...
...
@@ -2623,6 +2633,11 @@ type Group {
"""
path
:
String
!
"""
The
permission
level
required
to
create
projects
in
the
group
"""
projectCreationLevel
:
String
"""
Projects
within
this
namespace
"""
...
...
@@ -2658,11 +2673,26 @@ type Group {
"""
requestAccessEnabled
:
Boolean
"""
Indicates
if
all
users
in
this
group
are
required
to
set
up
two
-
factor
authentication
"""
requireTwoFactorAuthentication
:
Boolean
"""
Aggregated
storage
statistics
of
the
namespace
.
Only
available
for
root
namespaces
"""
rootStorageStatistics
:
RootStorageStatistics
"""
Indicates
if
sharing
a
project
with
another
group
within
this
group
is
prevented
"""
shareWithGroupLock
:
Boolean
"""
The
permission
level
required
to
create
subgroups
within
the
group
"""
subgroupCreationLevel
:
String
"""
Time
logged
in
issues
by
group
members
"""
...
...
@@ -2698,6 +2728,11 @@ type Group {
startDate
:
Time
!
):
TimelogConnection
!
"""
Time
before
two
-
factor
authentication
is
enforced
"""
twoFactorGracePeriod
:
Int
"""
Permissions
for
the
current
user
on
the
resource
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
6dd5eaad
...
...
@@ -3044,6 +3044,20 @@
"name"
:
"Group"
,
"description"
:
null
,
"fields"
:
[
{
"name"
:
"autoDevopsEnabled"
,
"description"
:
"Indicates whether Auto DevOps is enabled for all projects within this group"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"Boolean"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"avatarUrl"
,
"description"
:
"Avatar URL of the group"
,
...
...
@@ -3086,6 +3100,20 @@
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"emailsDisabled"
,
"description"
:
"Indicates if a group has email notifications disabled"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"Boolean"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"epic"
,
"description"
:
"Find a single epic"
,
...
...
@@ -3524,6 +3552,20 @@
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"projectCreationLevel"
,
"description"
:
"The permission level required to create projects in the group"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"String"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"projects"
,
"description"
:
"Projects within this namespace"
,
...
...
@@ -3605,6 +3647,20 @@
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"requireTwoFactorAuthentication"
,
"description"
:
"Indicates if all users in this group are required to set up two-factor authentication"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"Boolean"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"rootStorageStatistics"
,
"description"
:
"Aggregated storage statistics of the namespace. Only available for root namespaces"
,
...
...
@@ -3619,6 +3675,34 @@
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"shareWithGroupLock"
,
"description"
:
"Indicates if sharing a project with another group within this group is prevented"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"Boolean"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"subgroupCreationLevel"
,
"description"
:
"The permission level required to create subgroups within the group"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"String"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"timelogs"
,
"description"
:
"Time logged in issues by group members"
,
...
...
@@ -3704,6 +3788,20 @@
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"twoFactorGracePeriod"
,
"description"
:
"Time before two-factor authentication is enforced"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"Int"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"userPermissions"
,
"description"
:
"Permissions for the current user on the resource"
,
...
...
doc/api/graphql/reference/index.md
View file @
6dd5eaad
...
...
@@ -393,6 +393,13 @@ 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 |
|
`shareWithGroupLock`
| Boolean | Indicates if sharing a project with another group within this group is prevented |
|
`projectCreationLevel`
| String | The permission level required to create projects in the group |
|
`subgroupCreationLevel`
| String | The permission level required to create subgroups within the group |
|
`requireTwoFactorAuthentication`
| Boolean | Indicates if all users in this group are required to set up two-factor authentication |
|
`twoFactorGracePeriod`
| Int | Time before two-factor authentication is enforced |
|
`autoDevopsEnabled`
| Boolean | Indicates whether Auto DevOps is enabled for all projects within this group |
|
`emailsDisabled`
| Boolean | Indicates if a group has email notifications disabled |
|
`mentionsDisabled`
| Boolean | Indicates if a group is disabled from getting mentioned |
|
`parent`
| Group | Parent group |
|
`epicsEnabled`
| Boolean | Indicates if Epics are enabled for namespace |
...
...
spec/graphql/types/group_type_spec.rb
View file @
6dd5eaad
...
...
@@ -10,7 +10,14 @@ describe GitlabSchema.types['Group'] do
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]
expected_fields
=
%w[
id name path full_name full_path description description_html visibility
lfs_enabled request_access_enabled projects root_storage_statistics
web_url avatar_url share_with_group_lock project_creation_level
subgroup_creation_level require_two_factor_authentication
two_factor_grace_period auto_devops_enabled emails_disabled
mentions_disabled parent
]
is_expected
.
to
include_graphql_fields
(
*
expected_fields
)
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