debian-mirror-gitlab/app/graphql/resolvers/projects/fork_targets_resolver.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
627 B
Ruby
Raw Normal View History

2022-08-27 11:52:29 +05:30
# frozen_string_literal: true
module Resolvers
module Projects
class ForkTargetsResolver < BaseResolver
include ResolvesGroups
include Gitlab::Graphql::Authorize::AuthorizeResource
type Types::NamespaceType.connection_type, null: true
authorize :fork_project
authorizes_object!
alias_method :project, :object
argument :search, GraphQL::Types::String,
required: false,
description: 'Search query for path or name.'
private
def resolve_groups(**args)
ForkTargetsFinder.new(project, current_user).execute(args)
end
end
end
end