2020-03-13 15:44:24 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
module ErrorTracking
|
|
|
|
class SentryErrorCollectionResolver < BaseResolver
|
2021-01-29 00:20:46 +05:30
|
|
|
type Types::ErrorTracking::SentryErrorCollectionType, null: true
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
def resolve(**args)
|
|
|
|
project = object
|
|
|
|
|
|
|
|
service = ::ErrorTracking::ListIssuesService.new(
|
|
|
|
project,
|
|
|
|
context[:current_user]
|
|
|
|
)
|
|
|
|
|
|
|
|
Gitlab::ErrorTracking::ErrorCollection.new(
|
|
|
|
external_url: service.external_url,
|
|
|
|
project: project
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|