Class: Resolvers::ErrorTracking::SentryDetailedErrorResolver

Inherits:
BaseResolver
  • Object
show all
Defined in:
app/graphql/resolvers/error_tracking/sentry_detailed_error_resolver.rb

Instance Method Summary collapse

Methods inherited from BaseResolver

complexity, complexity_multiplier, #current_user, last, #object, resolver_complexity, #select_result, single, #single?, #synchronized_object

Methods included from Gitlab::Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Instance Method Details

#resolve(**args) ⇒ Object


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/graphql/resolvers/error_tracking/sentry_detailed_error_resolver.rb', line 10

def resolve(**args)
  current_user = context[:current_user]
  issue_id = GlobalID.parse(args[:id])&.model_id

  # Get data from Sentry
  response = ::ErrorTracking::IssueDetailsService.new(
    project,
    current_user,
    { issue_id: issue_id }
  ).execute
  issue = response[:issue]
  issue.gitlab_project = project if issue

  issue
end