debian-mirror-gitlab/app/graphql/resolvers/terraform/states_resolver.rb
2021-03-11 19:13:27 +05:30

23 lines
534 B
Ruby

# frozen_string_literal: true
module Resolvers
module Terraform
class StatesResolver < BaseResolver
type Types::Terraform::StateType.connection_type, null: true
alias_method :project, :object
when_single do
argument :name, GraphQL::STRING_TYPE,
required: true,
description: 'Name of the Terraform state.'
end
def resolve(**args)
::Terraform::StatesFinder
.new(project, current_user, params: args)
.execute
end
end
end
end