Class: Mutations::Ci::ProjectCiCdSettingsUpdate
- Inherits:
-
BaseMutation
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- Mutations::Ci::ProjectCiCdSettingsUpdate
- Includes:
- Gitlab::Utils::StrongMemoize, FindsProject
- Defined in:
- app/graphql/mutations/ci/project_ci_cd_settings_update.rb
Constant Summary
Constants inherited from BaseMutation
Constants included from Gitlab::Graphql::Authorize::AuthorizeResource
Gitlab::Graphql::Authorize::AuthorizeResource::ConfigurationError, Gitlab::Graphql::Authorize::AuthorizeResource::RESOURCE_ACCESS_ERROR
Instance Method Summary collapse
Methods inherited from BaseMutation
#api_user?, authorization, authorized?, authorizes_object?, #current_user, #errors_on_object, #load_application_object, #read_only?, #ready?, #unauthorized_object
Methods included from Gitlab::Graphql::Authorize::AuthorizeResource
#authorize!, #authorized_find!, #authorized_resource?, #find_object, #raise_resource_not_available_error!
Instance Method Details
#resolve(full_path:, **args) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'app/graphql/mutations/ci/project_ci_cd_settings_update.rb', line 40 def resolve(full_path:, **args) if args[:job_token_scope_enabled] raise Gitlab::Graphql::Errors::ArgumentError, 'job_token_scope_enabled can only be set to false' end settings = project(full_path).ci_cd_settings settings.update(args) { ci_cd_settings: settings, errors: errors_on_object(settings) } end |