Class: Mutations::Ci::PipelineSchedule::Update
- Inherits:
-
Base
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- Base
- Mutations::Ci::PipelineSchedule::Update
- Defined in:
- app/graphql/mutations/ci/pipeline_schedule/update.rb
Constant Summary
Constants inherited from Base
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(id:, variables: [], **pipeline_schedule_attrs) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'app/graphql/mutations/ci/pipeline_schedule/update.rb', line 43 def resolve(id:, variables: [], **pipeline_schedule_attrs) schedule = (id: id) params = pipeline_schedule_attrs.merge(variables_attributes: variable_attributes_for(variables)) service_response = ::Ci::PipelineSchedules::UpdateService .new(schedule, current_user, params) .execute { pipeline_schedule: schedule, errors: service_response.errors } end |