debian-mirror-gitlab/app/graphql/resolvers/deployment_resolver.rb

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

21 lines
470 B
Ruby
Raw Permalink Normal View History

2022-10-11 01:57:18 +05:30
# frozen_string_literal: true
module Resolvers
class DeploymentResolver < BaseResolver
argument :iid,
GraphQL::Types::ID,
required: true,
description: 'Project-level internal ID of the Deployment.'
type Types::DeploymentType, null: true
alias_method :project, :object
def resolve(iid:)
return unless project.present? && project.is_a?(::Project)
Deployment.for_iid(project, iid)
end
end
end