2020-05-24 23:13:21 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class ReleasesResolver < BaseResolver
|
|
|
|
type Types::ReleaseType.connection_type, null: true
|
|
|
|
|
|
|
|
alias_method :project, :object
|
|
|
|
|
|
|
|
# This resolver has a custom singular resolver
|
|
|
|
def self.single
|
|
|
|
Resolvers::ReleaseResolver
|
|
|
|
end
|
|
|
|
|
|
|
|
def resolve(**args)
|
2020-07-28 23:09:34 +05:30
|
|
|
return unless Feature.enabled?(:graphql_release_data, project, default_enabled: true)
|
|
|
|
|
2020-05-24 23:13:21 +05:30
|
|
|
ReleasesFinder.new(
|
|
|
|
project,
|
|
|
|
current_user
|
|
|
|
).execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|