diff options
Diffstat (limited to 'app/graphql/types/work_items/widgets/milestone_type.rb')
-rw-r--r-- | app/graphql/types/work_items/widgets/milestone_type.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/graphql/types/work_items/widgets/milestone_type.rb b/app/graphql/types/work_items/widgets/milestone_type.rb new file mode 100644 index 00000000000..73318e58a00 --- /dev/null +++ b/app/graphql/types/work_items/widgets/milestone_type.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Types + module WorkItems + module Widgets + # Disabling widget level authorization as it might be too granular + # and we already authorize the parent work item + # rubocop:disable Graphql/AuthorizeTypes + class MilestoneType < BaseObject + graphql_name 'WorkItemWidgetMilestone' + description 'Represents a milestone widget' + + implements Types::WorkItems::WidgetInterface + + field :milestone, + ::Types::MilestoneType, + null: true, + description: 'Milestone of the work item.' + end + # rubocop:enable Graphql/AuthorizeTypes + end + end +end |