Class: Mutations::Metrics::Dashboard::Annotations::Create

Inherits:
BaseMutation
  • Object
show all
Defined in:
app/graphql/mutations/metrics/dashboard/annotations/create.rb

Defined Under Namespace

Classes: AnnotationSource

Constant Summary collapse

ANNOTATION_SOURCE_ARGUMENT_ERROR =
'Either a cluster or environment global id is required'
INVALID_ANNOTATION_SOURCE_ERROR =
'Invalid cluster or environment id'

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 inherited from BaseMutation

#api_user?, authorization, authorized?, authorizes_object?, #current_user, #errors_on_object, #load_application_object, #read_only?, #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(_args) ⇒ Object



64
65
66
67
68
69
# File 'app/graphql/mutations/metrics/dashboard/annotations/create.rb', line 64

def resolve(_args)
  {
    annotation: nil,
    errors: []
  }
end