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
06a0b404
Commit
06a0b404
authored
Apr 01, 2021
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow user to filter epics by reaction emoji
- backend only
parent
7c7d964b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
changelogs/unreleased/325630-cablett-filter-epics-by-reaction-be.yml
...unreleased/325630-cablett-filter-epics-by-reaction-be.yml
+5
-0
ee/app/graphql/resolvers/epics_resolver.rb
ee/app/graphql/resolvers/epics_resolver.rb
+4
-0
ee/spec/graphql/resolvers/epics_resolver_spec.rb
ee/spec/graphql/resolvers/epics_resolver_spec.rb
+11
-0
No files found.
changelogs/unreleased/325630-cablett-filter-epics-by-reaction-be.yml
0 → 100644
View file @
06a0b404
---
title
:
Allow user to filter epics by their reaction emoji via GraphQL
merge_request
:
58211
author
:
type
:
added
ee/app/graphql/resolvers/epics_resolver.rb
View file @
06a0b404
...
@@ -50,6 +50,10 @@ module Resolvers
...
@@ -50,6 +50,10 @@ module Resolvers
required:
false
,
required:
false
,
description:
'Filter epics by given confidentiality.'
description:
'Filter epics by given confidentiality.'
argument
:my_reaction_emoji
,
GraphQL
::
STRING_TYPE
,
required:
false
,
description:
'Filter by reaction emoji applied by the current user.'
type
Types
::
EpicType
,
null:
true
type
Types
::
EpicType
,
null:
true
def
ready?
(
**
args
)
def
ready?
(
**
args
)
...
...
ee/spec/graphql/resolvers/epics_resolver_spec.rb
View file @
06a0b404
...
@@ -134,6 +134,17 @@ RSpec.describe Resolvers::EpicsResolver do
...
@@ -134,6 +134,17 @@ RSpec.describe Resolvers::EpicsResolver do
end
end
end
end
context
'with my_reaction_emoji'
do
it
'filters epics by reaction emoji'
do
create
(
:award_emoji
,
name:
'man_in_business_suit_levitating'
,
user:
current_user
,
awardable:
epic1
)
create
(
:award_emoji
,
name:
'thumbsdown'
,
user:
current_user
,
awardable:
epic2
)
epics
=
resolve_epics
(
my_reaction_emoji:
'man_in_business_suit_levitating'
)
expect
(
epics
).
to
contain_exactly
(
epic1
)
end
end
context
'with milestone_title'
do
context
'with milestone_title'
do
let_it_be
(
:milestone1
)
{
create
(
:milestone
,
group:
group
)
}
let_it_be
(
:milestone1
)
{
create
(
:milestone
,
group:
group
)
}
...
...
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