Commit 6b93e111 authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch 'epic-7110-work-items-ff' into 'master'

Adds yaml default enabled checks to `work_items` FF

See merge request gitlab-org/gitlab!82339
parents 36fd0950 c6d6c7fe
......@@ -33,7 +33,7 @@ module Mutations
def resolve(project_path:, **attributes)
project = authorized_find!(project_path)
unless Feature.enabled?(:work_items, project)
unless Feature.enabled?(:work_items, project, default_enabled: :yaml)
return { errors: ['`work_items` feature flag disabled for this project'] }
end
......
......@@ -31,7 +31,7 @@ module Mutations
def resolve(id:, work_item_data:)
work_item = authorized_find!(id: id)
unless Feature.enabled?(:work_items, work_item.project)
unless Feature.enabled?(:work_items, work_item.project, default_enabled: :yaml)
return { errors: ['`work_items` feature flag disabled for this project'] }
end
......
......@@ -20,7 +20,7 @@ module Mutations
def resolve(id:)
work_item = authorized_find!(id: id)
unless Feature.enabled?(:work_items, work_item.project)
unless Feature.enabled?(:work_items, work_item.project, default_enabled: :yaml)
return { errors: ['`work_items` feature flag disabled for this project'] }
end
......
......@@ -28,7 +28,7 @@ module Mutations
def resolve(id:, **attributes)
work_item = authorized_find!(id: id)
unless Feature.enabled?(:work_items, work_item.project)
unless Feature.enabled?(:work_items, work_item.project, default_enabled: :yaml)
return { errors: ['`work_items` feature flag disabled for this project'] }
end
......
......@@ -12,7 +12,7 @@ module Resolvers
def resolve(id:)
work_item = authorized_find!(id: id)
return unless Feature.enabled?(:work_items, work_item.project)
return unless Feature.enabled?(:work_items, work_item.project, default_enabled: :yaml)
work_item
end
......
......@@ -11,7 +11,7 @@ module Resolvers
' Argument is experimental and can be removed in the future without notice.'
def resolve(taskable: nil)
return unless Feature.enabled?(:work_items, object)
return unless Feature.enabled?(:work_items, object, default_enabled: :yaml)
# This will require a finder in the future when groups/projects get their work item types
# All groups/projects use the default types for now
......
......@@ -90,7 +90,8 @@ module Types
field :work_item, Types::WorkItemType,
null: true,
resolver: Resolvers::WorkItemResolver,
description: 'Find a work item. Returns `null` if `work_items` feature flag is disabled.'
description: 'Find a work item. Returns `null` if `work_items` feature flag is disabled.' \
' The feature is experimental and is subject to change without notice.'
field :merge_request, Types::MergeRequestType,
null: true,
......
......@@ -568,7 +568,7 @@ Returns [`Vulnerability`](#vulnerability).
### `Query.workItem`
Find a work item. Returns `null` if `work_items` feature flag is disabled.
Find a work item. Returns `null` if `work_items` feature flag is disabled. The feature is experimental and is subject to change without notice.
Returns [`WorkItem`](#workitem).
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