Class: Mutations::Pages::SetPagesForceHttps
- Inherits:
-
Base
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- Base
- Mutations::Pages::SetPagesForceHttps
- Defined in:
- app/graphql/mutations/pages/set_pages_force_https.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, authorization_scopes, 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(project_path:, value:) ⇒ Object
25 26 27 28 29 30 31 |
# File 'app/graphql/mutations/pages/set_pages_force_https.rb', line 25 def resolve(project_path:, value:) project = (project_path) return { project: project, errors: [] } if project.update(pages_https_only: value) { project: nil, errors: errors_on_object(project) } end |