Commit fb4a8d99 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'issue_346033_1/8' into 'master'

Fix GraphQL/OrderedFields offenses

See merge request gitlab-org/gitlab!81474
parents ee027ef5 868a9d25
......@@ -8,9 +8,9 @@ module Types
authorize :read_dependency_proxy
field :created_at, Types::TimeType, null: true, description: 'Timestamp of creation.'
field :enabled, GraphQL::Types::Boolean, null: false, description: 'Indicates whether the policy is enabled or disabled.'
field :ttl, GraphQL::Types::Int, null: true, description: 'Number of days to retain a cached image file.'
field :created_at, Types::TimeType, null: true, description: 'Timestamp of creation.'
field :updated_at, Types::TimeType, null: true, description: 'Timestamp of the most recent update.'
end
end
......@@ -8,13 +8,13 @@ module Types
authorize :read_dependency_proxy
field :id, ::Types::GlobalIDType[::DependencyProxy::Manifest], null: false, description: 'ID of the manifest.'
field :created_at, Types::TimeType, null: false, description: 'Date of creation.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.'
field :digest, GraphQL::Types::String, null: false, description: 'Digest of the manifest.'
field :file_name, GraphQL::Types::String, null: false, description: 'Name of the manifest.'
field :id, ::Types::GlobalIDType[::DependencyProxy::Manifest], null: false, description: 'ID of the manifest.'
field :image_name, GraphQL::Types::String, null: false, description: 'Name of the image.'
field :size, GraphQL::Types::String, null: false, description: 'Size of the manifest file.'
field :digest, GraphQL::Types::String, null: false, description: 'Digest of the manifest.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.'
def image_name
object.file_name.chomp(File.extname(object.file_name))
......
......@@ -8,10 +8,10 @@ module Types
authorize :read_design
field :project, Types::ProjectType, null: false,
description: 'Project associated with the design collection.'
field :issue, Types::IssueType, null: false,
description: 'Issue associated with the design collection.'
field :project, Types::ProjectType, null: false,
description: 'Project associated with the design collection.'
field :designs,
Types::DesignManagement::DesignType.connection_type,
......
......@@ -6,10 +6,10 @@ module Types
class DiffRefsType < BaseObject
graphql_name 'DiffRefs'
field :head_sha, GraphQL::Types::String, null: false,
description: 'SHA of the HEAD at the time the comment was made.'
field :base_sha, GraphQL::Types::String, null: true,
description: 'Merge base of the branch the comment was made on.'
field :head_sha, GraphQL::Types::String, null: false,
description: 'SHA of the HEAD at the time the comment was made.'
field :start_sha, GraphQL::Types::String, null: false,
description: 'SHA of the branch being compared against.'
end
......
......@@ -10,10 +10,10 @@ module Types
field :additions, GraphQL::Types::Int, null: false,
description: 'Number of lines added.'
field :deletions, GraphQL::Types::Int, null: false,
description: 'Number of lines deleted.'
field :changes, GraphQL::Types::Int, null: false,
description: 'Number of lines changed.'
field :deletions, GraphQL::Types::Int, null: false,
description: 'Number of lines deleted.'
field :file_count, GraphQL::Types::Int, null: false,
description: 'Number of files changed.'
......
......@@ -8,12 +8,12 @@ module Types
description 'Changes to a single file'
field :path, GraphQL::Types::String, null: false,
description: 'File path, relative to repository root.'
field :additions, GraphQL::Types::Int, null: false,
description: 'Number of lines added to this file.'
field :deletions, GraphQL::Types::Int, null: false,
description: 'Number of lines deleted from this file.'
field :path, GraphQL::Types::String, null: false,
description: 'File path, relative to repository root.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -10,46 +10,68 @@ module Types
authorize :read_sentry_issue
field :id, GraphQL::Types::ID,
null: false,
description: 'ID (global ID) of the error.'
field :integrated, GraphQL::Types::Boolean,
null: true,
description: 'Error tracking backend.'
field :sentry_id, GraphQL::Types::String,
method: :id,
null: false,
description: 'ID (Sentry ID) of the error.'
field :title, GraphQL::Types::String,
field :count, GraphQL::Types::Int,
null: false,
description: 'Title of the error.'
field :type, GraphQL::Types::String,
description: 'Count of occurrences.'
field :culprit, GraphQL::Types::String,
null: false,
description: 'Type of the error.'
field :user_count, GraphQL::Types::Int,
description: 'Culprit of the error.'
field :external_base_url, GraphQL::Types::String,
null: false,
description: 'Count of users affected by the error.'
field :count, GraphQL::Types::Int,
description: 'External Base URL of the Sentry Instance.'
field :external_url, GraphQL::Types::String,
null: false,
description: 'Count of occurrences.'
description: 'External URL of the error.'
field :first_release_last_commit, GraphQL::Types::String,
null: true,
description: 'Commit the error was first seen.'
field :first_release_short_version, GraphQL::Types::String,
null: true,
description: 'Release short version the error was first seen.'
field :first_release_version, GraphQL::Types::String,
null: true,
description: 'Release version the error was first seen.'
field :first_seen, Types::TimeType,
null: false,
description: 'Timestamp when the error was first seen.'
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
null: false,
description: 'Last 24hr stats of the error.'
field :gitlab_commit, GraphQL::Types::String,
null: true,
description: 'GitLab commit SHA attributed to the Error based on the release version.'
field :gitlab_commit_path, GraphQL::Types::String,
null: true,
description: 'Path to the GitLab page for the GitLab commit attributed to the error.'
field :gitlab_issue_path, GraphQL::Types::String,
method: :gitlab_issue,
null: true,
description: 'URL of GitLab Issue.'
field :id, GraphQL::Types::ID,
null: false,
description: 'ID (global ID) of the error.'
field :integrated, GraphQL::Types::Boolean,
null: true,
description: 'Error tracking backend.'
field :last_release_last_commit, GraphQL::Types::String,
null: true,
description: 'Commit the error was last seen.'
field :last_release_short_version, GraphQL::Types::String,
null: true,
description: 'Release short version the error was last seen.'
field :last_release_version, GraphQL::Types::String,
null: true,
description: 'Release version the error was last seen.'
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 :culprit, GraphQL::Types::String,
null: false,
description: 'Culprit of the error.'
field :external_base_url, GraphQL::Types::String,
null: false,
description: 'External Base URL of the Sentry Instance.'
field :external_url, GraphQL::Types::String,
field :sentry_id, GraphQL::Types::String,
method: :id,
null: false,
description: 'External URL of the error.'
description: 'ID (Sentry ID) of the error.'
field :sentry_project_id, GraphQL::Types::ID,
method: :project_id,
null: false,
......@@ -68,40 +90,18 @@ module Types
field :status, Types::ErrorTracking::SentryErrorStatusEnum,
null: false,
description: 'Status of the error.'
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
null: false,
description: 'Last 24hr stats of the error.'
field :first_release_last_commit, GraphQL::Types::String,
null: true,
description: 'Commit the error was first seen.'
field :last_release_last_commit, GraphQL::Types::String,
null: true,
description: 'Commit the error was last seen.'
field :first_release_short_version, GraphQL::Types::String,
null: true,
description: 'Release short version the error was first seen.'
field :last_release_short_version, GraphQL::Types::String,
null: true,
description: 'Release short version the error was last seen.'
field :first_release_version, GraphQL::Types::String,
null: true,
description: 'Release version the error was first seen.'
field :last_release_version, GraphQL::Types::String,
null: true,
description: 'Release version the error was last seen.'
field :gitlab_commit, GraphQL::Types::String,
null: true,
description: 'GitLab commit SHA attributed to the Error based on the release version.'
field :gitlab_commit_path, GraphQL::Types::String,
null: true,
description: 'Path to the GitLab page for the GitLab commit attributed to the error.'
field :gitlab_issue_path, GraphQL::Types::String,
method: :gitlab_issue,
null: true,
description: 'URL of GitLab Issue.'
field :tags, Types::ErrorTracking::SentryErrorTagsType,
null: false,
description: 'Tags associated with the Sentry 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.'
end
end
end
......@@ -8,15 +8,15 @@ module Types
authorize :read_sentry_issue
field :errors,
description: "Collection of Sentry Errors.",
resolver: Resolvers::ErrorTracking::SentryErrorsResolver
field :detailed_error,
description: 'Detailed version of a Sentry error on the project.',
resolver: Resolvers::ErrorTracking::SentryDetailedErrorResolver
field :error_stack_trace,
description: 'Stack Trace of Sentry Error.',
resolver: Resolvers::ErrorTracking::SentryErrorStackTraceResolver
field :errors,
description: "Collection of Sentry Errors.",
resolver: Resolvers::ErrorTracking::SentryErrorsResolver
field :external_url,
GraphQL::Types::String,
null: true,
......
......@@ -6,12 +6,12 @@ module Types
class SentryErrorFrequencyType < ::Types::BaseObject
graphql_name 'SentryErrorFrequency'
field :time, Types::TimeType,
null: false,
description: "Time the error frequency stats were recorded."
field :count, GraphQL::Types::Int,
null: false,
description: "Count of errors received since the previously recorded time."
field :time, Types::TimeType,
null: false,
description: "Time the error frequency stats were recorded."
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -7,14 +7,14 @@ module Types
graphql_name 'SentryErrorStackTraceContext'
description 'An object context for a Sentry error stack trace'
field :line,
GraphQL::Types::Int,
null: false,
description: 'Line number of the context.'
field :code,
GraphQL::Types::String,
null: false,
description: 'Code number of the context.'
field :line,
GraphQL::Types::Int,
null: false,
description: 'Line number of the context.'
def line
object[0]
......
......@@ -7,18 +7,18 @@ module Types
graphql_name 'SentryErrorStackTraceEntry'
description 'An object containing a stack trace entry for a Sentry error'
field :function, GraphQL::Types::String,
field :col, GraphQL::Types::String,
null: true,
description: 'Function in which the Sentry error occurred.'
field :col, GraphQL::Types::String,
field :file_name, GraphQL::Types::String,
null: true,
description: 'File in which the Sentry error occurred.'
field :function, GraphQL::Types::String,
null: true,
description: 'Function in which the Sentry error occurred.'
field :line, GraphQL::Types::String,
null: true,
description: 'Function in which the Sentry error occurred.'
field :file_name, GraphQL::Types::String,
null: true,
description: 'File in which the Sentry error occurred.'
field :trace_context, [Types::ErrorTracking::SentryErrorStackTraceContextType],
null: true,
description: 'Context of the Sentry error.'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment