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
fc4cf4e2
Commit
fc4cf4e2
authored
Sep 28, 2020
by
David O'Regan
Committed by
Vitali Tatarintev
Sep 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add assignee usernames
Add GraphQL resolver property for assignee usernames as a array for filtering
parent
7d27bb49
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
0 deletions
+107
-0
app/graphql/resolvers/concerns/issue_resolver_arguments.rb
app/graphql/resolvers/concerns/issue_resolver_arguments.rb
+3
-0
changelogs/unreleased/254903-add-multiple-assignee-filter-graphql.yml
...nreleased/254903-add-multiple-assignee-filter-graphql.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+20
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+72
-0
spec/graphql/resolvers/issues_resolver_spec.rb
spec/graphql/resolvers/issues_resolver_spec.rb
+7
-0
No files found.
app/graphql/resolvers/concerns/issue_resolver_arguments.rb
View file @
fc4cf4e2
...
...
@@ -24,6 +24,9 @@ module IssueResolverArguments
argument
:assignee_username
,
GraphQL
::
STRING_TYPE
,
required:
false
,
description:
'Username of a user assigned to the issue'
argument
:assignee_usernames
,
[
GraphQL
::
STRING_TYPE
],
required:
false
,
description:
'Usernames of users assigned to the issue'
argument
:assignee_id
,
GraphQL
::
STRING_TYPE
,
required:
false
,
description:
'ID of a user assigned to the issues, "none" and "any" values supported'
...
...
changelogs/unreleased/254903-add-multiple-assignee-filter-graphql.yml
0 → 100644
View file @
fc4cf4e2
---
title
:
Add assignee usernames to issue resolver
merge_request
:
43294
author
:
type
:
changed
doc/api/graphql/reference/gitlab_schema.graphql
View file @
fc4cf4e2
...
...
@@ -7363,6 +7363,11 @@ type Group {
"""
assigneeUsername
:
String
"""
Usernames
of
users
assigned
to
the
issue
"""
assigneeUsernames
:
[
String
!]
"""
Username
of
the
author
of
the
issue
"""
...
...
@@ -12930,6 +12935,11 @@ type Project {
"""
assigneeUsername
:
String
"""
Usernames
of
users
assigned
to
the
issue
"""
assigneeUsernames
:
[
String
!]
"""
Username
of
the
author
of
the
issue
"""
...
...
@@ -13025,6 +13035,11 @@ type Project {
"""
assigneeUsername
:
String
"""
Usernames
of
users
assigned
to
the
issue
"""
assigneeUsernames
:
[
String
!]
"""
Username
of
the
author
of
the
issue
"""
...
...
@@ -13110,6 +13125,11 @@ type Project {
"""
assigneeUsername
:
String
"""
Usernames
of
users
assigned
to
the
issue
"""
assigneeUsernames
:
[
String
!]
"""
Username
of
the
author
of
the
issue
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
fc4cf4e2
...
...
@@ -20370,6 +20370,24 @@
},
"defaultValue": null
},
{
"name": "assigneeUsernames",
"description": "Usernames of users assigned to the issue",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "assigneeId",
"description": "ID of a user assigned to the issues, \"none\" and \"any\" values supported",
...
...
@@ -38127,6 +38145,24 @@
},
"defaultValue": null
},
{
"name": "assigneeUsernames",
"description": "Usernames of users assigned to the issue",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "assigneeId",
"description": "ID of a user assigned to the issues, \"none\" and \"any\" values supported",
...
...
@@ -38348,6 +38384,24 @@
},
"defaultValue": null
},
{
"name": "assigneeUsernames",
"description": "Usernames of users assigned to the issue",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "assigneeId",
"description": "ID of a user assigned to the issues, \"none\" and \"any\" values supported",
...
...
@@ -38535,6 +38589,24 @@
},
"defaultValue": null
},
{
"name": "assigneeUsernames",
"description": "Usernames of users assigned to the issue",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "assigneeId",
"description": "ID of a user assigned to the issues, \"none\" and \"any\" values supported",
spec/graphql/resolvers/issues_resolver_spec.rb
View file @
fc4cf4e2
...
...
@@ -46,6 +46,13 @@ RSpec.describe Resolvers::IssuesResolver do
expect
(
resolve_issues
(
assignee_username:
assignee
.
username
)).
to
contain_exactly
(
issue2
)
end
it
'filters by two assignees'
do
assignee2
=
create
(
:user
)
issue2
.
update!
(
assignees:
[
assignee
,
assignee2
])
expect
(
resolve_issues
(
assignee_id:
[
assignee
.
id
,
assignee2
.
id
])).
to
contain_exactly
(
issue2
)
end
it
'filters by assignee_id'
do
expect
(
resolve_issues
(
assignee_id:
assignee
.
id
)).
to
contain_exactly
(
issue2
)
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