Commit e50d2168 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '325630-cablett-filter-epics-by-reaction-be' into 'master'

Allow user to filter epics by reaction emoji

See merge request gitlab-org/gitlab!58211
parents 54a49f06 06a0b404
---
title: Allow user to filter epics by their reaction emoji via GraphQL
merge_request: 58211
author:
type: added
......@@ -50,6 +50,10 @@ module Resolvers
required: false,
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
def ready?(**args)
......
......@@ -134,6 +134,17 @@ RSpec.describe Resolvers::EpicsResolver do
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
let_it_be(:milestone1) { create(:milestone, group: group) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment