2020-01-29 12:09:08 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
module ErrorTracking
|
|
|
|
# rubocop: disable Graphql/AuthorizeTypes
|
|
|
|
class SentryErrorType < ::Types::BaseObject
|
|
|
|
graphql_name 'SentryError'
|
2020-09-16 06:09:24 +00:00
|
|
|
description 'A Sentry error. A simplified version of SentryDetailedError'
|
2020-01-29 12:09:08 +00:00
|
|
|
|
|
|
|
present_using SentryErrorPresenter
|
|
|
|
|
2021-07-22 09:08:22 +00:00
|
|
|
field :count, GraphQL::Types::Int,
|
2020-01-29 12:09:08 +00:00
|
|
|
null: false,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'Count of occurrences.'
|
2021-07-22 09:08:22 +00:00
|
|
|
field :culprit, GraphQL::Types::String,
|
2020-01-29 12:09:08 +00:00
|
|
|
null: false,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'Culprit of the error.'
|
2021-07-22 09:08:22 +00:00
|
|
|
field :external_url, GraphQL::Types::String,
|
2020-01-29 12:09:08 +00:00
|
|
|
null: false,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'External URL of the error.'
|
2022-02-28 18:14:03 +00:00
|
|
|
field :first_seen, Types::TimeType,
|
2020-01-29 12:09:08 +00:00
|
|
|
null: false,
|
2022-02-28 18:14:03 +00:00
|
|
|
description: 'Timestamp when the error was first seen.'
|
2020-01-29 12:09:08 +00:00
|
|
|
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
|
|
|
|
null: false,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'Last 24hr stats of the error.'
|
2022-02-28 18:14:03 +00:00
|
|
|
field :id, GraphQL::Types::ID,
|
|
|
|
null: false,
|
|
|
|
description: 'ID (global ID) of the error.'
|
|
|
|
field :last_seen, Types::TimeType,
|
|
|
|
null: false,
|
|
|
|
description: 'Timestamp when the error was last seen.'
|
|
|
|
field :message, GraphQL::Types::String,
|
|
|
|
null: true,
|
|
|
|
description: 'Sentry metadata message of the error.'
|
|
|
|
field :sentry_id, GraphQL::Types::String,
|
|
|
|
method: :id,
|
|
|
|
null: false,
|
|
|
|
description: 'ID (Sentry ID) of the error.'
|
2021-07-22 09:08:22 +00:00
|
|
|
field :sentry_project_id, GraphQL::Types::ID,
|
2020-01-29 12:09:08 +00:00
|
|
|
method: :project_id,
|
|
|
|
null: false,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'ID of the project (Sentry project).'
|
2021-07-22 09:08:22 +00:00
|
|
|
field :sentry_project_name, GraphQL::Types::String,
|
2020-01-29 12:09:08 +00:00
|
|
|
method: :project_name,
|
|
|
|
null: false,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'Name of the project affected by the error.'
|
2021-07-22 09:08:22 +00:00
|
|
|
field :sentry_project_slug, GraphQL::Types::String,
|
2020-01-29 12:09:08 +00:00
|
|
|
method: :project_slug,
|
|
|
|
null: false,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'Slug of the project affected by the error.'
|
2022-02-28 18:14:03 +00:00
|
|
|
field :short_id, GraphQL::Types::String,
|
|
|
|
null: false,
|
|
|
|
description: 'Short ID (Sentry ID) of the error.'
|
|
|
|
field :status, Types::ErrorTracking::SentryErrorStatusEnum,
|
|
|
|
null: false,
|
|
|
|
description: 'Status of the error.'
|
|
|
|
field :title, GraphQL::Types::String,
|
|
|
|
null: false,
|
|
|
|
description: 'Title of the error.'
|
|
|
|
field :type, GraphQL::Types::String,
|
|
|
|
null: false,
|
|
|
|
description: 'Type of the error.'
|
|
|
|
field :user_count, GraphQL::Types::Int,
|
|
|
|
null: false,
|
|
|
|
description: 'Count of users affected by the error.'
|
2020-01-29 12:09:08 +00:00
|
|
|
end
|
|
|
|
# rubocop: enable Graphql/AuthorizeTypes
|
|
|
|
end
|
|
|
|
end
|