gitlab-org--gitlab-foss/app/graphql/resolvers/release_resolver.rb

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

26 lines
509 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Resolvers
class ReleaseResolver < BaseResolver
type Types::ReleaseType, null: true
argument :tag_name, GraphQL::Types::String,
required: true,
description: 'Name of the tag associated to the release.'
alias_method :project, :object
def self.single
self
end
def resolve(tag_name:)
ReleasesFinder.new(
project,
current_user,
{ tag: tag_name }
).execute.first
end
end
end