Welcome to mirror list, hosted at ThFree Co, Russian Federation.

unlock.rb « state « terraform « mutations « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0818dbd7fb3e0c4a06e587cdafc5b143ed7e0b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Mutations
  module Terraform
    module State
      class Unlock < Base
        graphql_name 'TerraformStateUnlock'

        def resolve(id:)
          state = authorized_find!(id: id)
          state.update(lock_xid: nil, locked_by_user: nil, locked_at: nil)

          { errors: errors_on_object(state) }
        end
      end
    end
  end
end