Class: Types::WorkItems::Widgets::DevelopmentType
- Inherits:
-
BaseObject
- Object
- GraphQL::Schema::Object
- BaseObject
- Types::WorkItems::Widgets::DevelopmentType
- Defined in:
- app/graphql/types/work_items/widgets/development_type.rb
Overview
Disabling widget level authorization as it might be too granular and we already authorize the parent work item rubocop:disable Graphql/AuthorizeTypes – reason above
Instance Method Summary collapse
Methods inherited from BaseObject
accepts, assignable?, authorization, authorization_scopes, authorize, authorized?, #current_user, #id
Methods included from Gitlab::Graphql::Present
Instance Method Details
#closing_merge_requests ⇒ Object
48 49 50 51 52 53 54 |
# File 'app/graphql/types/work_items/widgets/development_type.rb', line 48 def closing_merge_requests if object.closing_merge_requests.loaded? object.closing_merge_requests else object.closing_merge_requests. end end |
#related_branches ⇒ Object
40 41 42 43 44 45 46 |
# File 'app/graphql/types/work_items/widgets/development_type.rb', line 40 def return [] unless object.work_item.project ::Issues::RelatedBranchesService .new(container: object.work_item.project, current_user: current_user) .execute(object.work_item) end |