Class: Mutations::DependencyProxy::GroupSettings::Update

Inherits:
BaseMutation
  • Object
show all
Includes:
ResolvesGroup
Defined in:
app/graphql/mutations/dependency_proxy/group_settings/update.rb

Constant Summary

Constants inherited from BaseMutation

BaseMutation::ERROR_MESSAGE

Constants included from Gitlab::Graphql::Authorize::AuthorizeResource

Gitlab::Graphql::Authorize::AuthorizeResource::ConfigurationError, Gitlab::Graphql::Authorize::AuthorizeResource::RESOURCE_ACCESS_ERROR

Instance Method Summary collapse

Methods included from ResolvesGroup

#group_resolver, #resolve_group

Methods inherited from BaseMutation

#api_user?, authorization, authorized?, authorizes_object?, #current_user, #errors_on_object, #load_application_object, #ready?, #unauthorized_object

Methods included from Gitlab::Graphql::Authorize::AuthorizeResource

#authorize!, #authorized_find!, #authorized_resource?, #raise_resource_not_available_error!

Instance Method Details

#resolve(group_path:, **args) ⇒ Object


28
29
30
31
32
33
34
35
36
37
38
39
# File 'app/graphql/mutations/dependency_proxy/group_settings/update.rb', line 28

def resolve(group_path:, **args)
  group = authorized_find!(group_path: group_path)

  result = ::DependencyProxy::GroupSettings::UpdateService
    .new(container: group, current_user: current_user, params: args)
    .execute

  {
    dependency_proxy_setting: result.payload[:dependency_proxy_setting],
    errors: result.errors
  }
end