diff options
Diffstat (limited to 'app/graphql/mutations/terraform/state/base.rb')
-rw-r--r-- | app/graphql/mutations/terraform/state/base.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/graphql/mutations/terraform/state/base.rb b/app/graphql/mutations/terraform/state/base.rb new file mode 100644 index 00000000000..b1721c784b1 --- /dev/null +++ b/app/graphql/mutations/terraform/state/base.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Mutations + module Terraform + module State + class Base < BaseMutation + authorize :admin_terraform_state + + argument :id, + Types::GlobalIDType[::Terraform::State], + required: true, + description: 'Global ID of the Terraform state' + + private + + def find_object(id:) + GitlabSchema.find_by_gid(id) + end + end + end + end +end |