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

Merge branch 'issue_346033_1/1' into 'master'

Fix GraphQL/OrderedFields offenses

See merge request gitlab-org/gitlab!81414
parents d70ac8b7 aea3aec7
......@@ -18,67 +18,67 @@ module Types
implements(Types::CurrentUserTodos)
implements(Types::EventableType)
field :confidential, GraphQL::Types::Boolean, null: true,
description: 'Indicates if the epic is confidential.'
field :description, GraphQL::Types::String, null: true,
description: 'Description of the epic.'
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the epic.'
field :iid, GraphQL::Types::ID, null: false,
description: 'Internal ID of the epic.'
field :title, GraphQL::Types::String, null: true,
description: 'Title of the epic.'
field :description, GraphQL::Types::String, null: true,
description: 'Description of the epic.'
field :state, EpicStateEnum, null: false,
description: 'State of the epic.'
field :confidential, GraphQL::Types::Boolean, null: true,
description: 'Indicates if the epic is confidential.'
field :title, GraphQL::Types::String, null: true,
description: 'Title of the epic.'
field :author, Types::UserType, null: false,
description: 'Author of the epic.'
field :group, GroupType, null: false,
description: 'Group to which the epic belongs.'
field :parent, EpicType, null: true,
description: 'Parent epic of the epic.'
field :author, Types::UserType, null: false,
description: 'Author of the epic.'
field :start_date, Types::TimeType, null: true,
description: 'Start date of the epic.'
field :start_date_is_fixed, GraphQL::Types::Boolean, null: true,
description: 'Indicates if the start date has been manually set.',
method: :start_date_is_fixed?, authorize: :admin_epic
field :start_date_fixed, Types::TimeType, null: true,
description: 'Fixed start date of the epic.',
authorize: :admin_epic
field :start_date_from_milestones, Types::TimeType, null: true,
description: 'Inherited start date of the epic from milestones.',
authorize: :admin_epic
field :start_date_from_inherited_source, Types::TimeType, null: true,
description: 'Inherited start date of the epic from child epics or milestones.',
authorize: :admin_epic
field :start_date_from_milestones, Types::TimeType, null: true,
description: 'Inherited start date of the epic from milestones.',
authorize: :admin_epic
field :start_date_is_fixed, GraphQL::Types::Boolean, null: true,
description: 'Indicates if the start date has been manually set.',
method: :start_date_is_fixed?, authorize: :admin_epic
field :due_date, Types::TimeType, null: true,
description: 'Due date of the epic.'
field :due_date_is_fixed, GraphQL::Types::Boolean, null: true,
description: 'Indicates if the due date has been manually set.',
method: :due_date_is_fixed?, authorize: :admin_epic
field :due_date_fixed, Types::TimeType, null: true,
description: 'Fixed due date of the epic.',
authorize: :admin_epic
field :due_date_from_milestones, Types::TimeType, null: true,
description: 'Inherited due date of the epic from milestones.',
authorize: :admin_epic
field :due_date_from_inherited_source, Types::TimeType, null: true,
description: 'Inherited due date of the epic from child epics or milestones.',
authorize: :admin_epic
field :due_date_from_milestones, Types::TimeType, null: true,
description: 'Inherited due date of the epic from milestones.',
authorize: :admin_epic
field :due_date_is_fixed, GraphQL::Types::Boolean, null: true,
description: 'Indicates if the due date has been manually set.',
method: :due_date_is_fixed?, authorize: :admin_epic
field :upvotes, GraphQL::Types::Int, null: false,
description: 'Number of upvotes the epic has received.'
field :downvotes, GraphQL::Types::Int, null: false,
description: 'Number of downvotes the epic has received.'
field :upvotes, GraphQL::Types::Int, null: false,
description: 'Number of upvotes the epic has received.'
field :user_notes_count, GraphQL::Types::Int, null: false,
description: 'Number of user notes of the epic.',
resolver: Resolvers::UserNotesCountResolver
field :user_discussions_count, GraphQL::Types::Int, null: false,
description: 'Number of user discussions in the epic.',
resolver: Resolvers::UserDiscussionsCountResolver
field :user_notes_count, GraphQL::Types::Int, null: false,
description: 'Number of user notes of the epic.',
resolver: Resolvers::UserNotesCountResolver
field :closed_at, Types::TimeType, null: true,
description: 'Timestamp of when the epic was closed.'
......@@ -108,11 +108,11 @@ module Types
description: 'Web URL of the epic.',
method: :group_epic_url
field :relative_position, GraphQL::Types::Int, null: true,
description: 'Relative position of the epic in the epic tree.'
field :relation_path, GraphQL::Types::String, null: true,
description: 'URI path of the epic-issue relationship.',
method: :group_epic_link_path
field :relative_position, GraphQL::Types::Int, null: true,
description: 'Relative position of the epic in the epic tree.'
field :reference, GraphQL::Types::String, null: false,
description: 'Internal reference of the epic. Returned in shortened format by default.',
......
......@@ -7,62 +7,62 @@ module Types
authorize :read_geo_node
field :id, GraphQL::Types::ID, null: false, description: 'ID of this GeoNode.'
field :primary, GraphQL::Types::Boolean, null: true, description: 'Indicates whether this Geo node is the primary.'
field :container_repositories_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of container repository sync for this secondary node.'
field :enabled, GraphQL::Types::Boolean, null: true, description: 'Indicates whether this Geo node is enabled.'
field :name, GraphQL::Types::String, null: true, description: 'Unique identifier for this Geo node.'
field :url, GraphQL::Types::String, null: true, description: 'User-facing URL for this Geo node.'
field :internal_url, GraphQL::Types::String, null: true, description: 'URL defined on the primary node secondary nodes should use to contact it.'
field :files_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of LFS/attachment backfill for this secondary node.'
field :repos_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of repository backfill for this secondary node.'
field :verification_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of repository verification for this secondary node.'
field :container_repositories_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of container repository sync for this secondary node.'
field :sync_object_storage, GraphQL::Types::Boolean, null: true, description: 'Indicates if this secondary node will replicate blobs in Object Storage.'
field :selective_sync_type, GraphQL::Types::String, null: true, description: 'Indicates if syncing is limited to only specific groups, or shards.'
field :selective_sync_shards, type: [GraphQL::Types::String], null: true, description: 'Repository storages whose projects should be synced, if `selective_sync_type` == `shards`.'
field :selective_sync_namespaces, ::Types::NamespaceType.connection_type, null: true, method: :namespaces, description: 'Namespaces that should be synced, if `selective_sync_type` == `namespaces`.'
field :minimum_reverification_interval, GraphQL::Types::Int, null: true, description: 'Interval (in days) in which the repository verification is valid. After expiry, it is reverted.'
field :group_wiki_repository_registries, ::Types::Geo::GroupWikiRepositoryRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::GroupWikiRepositoryRegistriesResolver,
description: 'Find group wiki repository registries on this Geo node.'
field :id, GraphQL::Types::ID, null: false, description: 'ID of this GeoNode.'
field :internal_url, GraphQL::Types::String, null: true, description: 'URL defined on the primary node secondary nodes should use to contact it.'
field :job_artifact_registries, ::Types::Geo::JobArtifactRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::JobArtifactRegistriesResolver,
description: 'Find Job Artifact registries on this Geo node',
feature_flag: :geo_job_artifact_replication
field :lfs_object_registries, ::Types::Geo::LfsObjectRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::LfsObjectRegistriesResolver,
description: 'Find LFS object registries on this Geo node.'
field :merge_request_diff_registries, ::Types::Geo::MergeRequestDiffRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::MergeRequestDiffRegistriesResolver,
description: 'Find merge request diff registries on this Geo node.'
field :minimum_reverification_interval, GraphQL::Types::Int, null: true, description: 'Interval (in days) in which the repository verification is valid. After expiry, it is reverted.'
field :name, GraphQL::Types::String, null: true, description: 'Unique identifier for this Geo node.'
field :package_file_registries, ::Types::Geo::PackageFileRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::PackageFileRegistriesResolver,
description: 'Package file registries of the GeoNode.'
field :pages_deployment_registries, ::Types::Geo::PagesDeploymentRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::PagesDeploymentRegistriesResolver,
description: 'Find Pages Deployment registries on this Geo node'
field :pipeline_artifact_registries, ::Types::Geo::PipelineArtifactRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::PipelineArtifactRegistriesResolver,
description: 'Find pipeline artifact registries on this Geo node.'
field :primary, GraphQL::Types::Boolean, null: true, description: 'Indicates whether this Geo node is the primary.'
field :repos_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of repository backfill for this secondary node.'
field :selective_sync_namespaces, ::Types::NamespaceType.connection_type, null: true, method: :namespaces, description: 'Namespaces that should be synced, if `selective_sync_type` == `namespaces`.'
field :selective_sync_shards, type: [GraphQL::Types::String], null: true, description: 'Repository storages whose projects should be synced, if `selective_sync_type` == `shards`.'
field :selective_sync_type, GraphQL::Types::String, null: true, description: 'Indicates if syncing is limited to only specific groups, or shards.'
field :snippet_repository_registries, ::Types::Geo::SnippetRepositoryRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::SnippetRepositoryRegistriesResolver,
description: 'Find snippet repository registries on this Geo node.'
field :sync_object_storage, GraphQL::Types::Boolean, null: true, description: 'Indicates if this secondary node will replicate blobs in Object Storage.'
field :terraform_state_version_registries, ::Types::Geo::TerraformStateVersionRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::TerraformStateVersionRegistriesResolver,
description: 'Find terraform state version registries on this Geo node.'
field :group_wiki_repository_registries, ::Types::Geo::GroupWikiRepositoryRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::GroupWikiRepositoryRegistriesResolver,
description: 'Find group wiki repository registries on this Geo node.'
field :lfs_object_registries, ::Types::Geo::LfsObjectRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::LfsObjectRegistriesResolver,
description: 'Find LFS object registries on this Geo node.'
field :pipeline_artifact_registries, ::Types::Geo::PipelineArtifactRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::PipelineArtifactRegistriesResolver,
description: 'Find pipeline artifact registries on this Geo node.'
field :pages_deployment_registries, ::Types::Geo::PagesDeploymentRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::PagesDeploymentRegistriesResolver,
description: 'Find Pages Deployment registries on this Geo node'
field :upload_registries, ::Types::Geo::UploadRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::UploadRegistriesResolver,
description: 'Find Upload registries on this Geo node'
field :job_artifact_registries, ::Types::Geo::JobArtifactRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::JobArtifactRegistriesResolver,
description: 'Find Job Artifact registries on this Geo node',
feature_flag: :geo_job_artifact_replication
field :url, GraphQL::Types::String, null: true, description: 'User-facing URL for this Geo node.'
field :verification_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of repository verification for this secondary node.'
end
end
end
......@@ -7,8 +7,8 @@ module Types
graphql_name 'RequirementStatesCount'
description 'Counts of requirements by their state'
field :opened, GraphQL::Types::Int, null: true, description: 'Number of opened requirements.'
field :archived, GraphQL::Types::Int, null: true, description: 'Number of archived requirements.'
field :opened, GraphQL::Types::Int, null: true, description: 'Number of opened requirements.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -10,7 +10,7 @@ module Types
authorize :read_scan
field :name, GraphQL::Types::String, null: false, description: 'Name of the scan.'
field :errors, [GraphQL::Types::String], null: false, description: 'List of errors.'
field :name, GraphQL::Types::String, null: false, description: 'Name of the scan.'
end
end
......@@ -6,7 +6,7 @@ module Types
graphql_name 'ScannedResource'
description 'Represents a resource scanned by a security scan'
field :url, GraphQL::Types::String, null: true, description: 'URL scanned by the scanner.'
field :request_method, GraphQL::Types::String, null: true, description: 'HTTP request method used to access the URL.'
field :url, GraphQL::Types::String, null: true, description: 'URL scanned by the scanner.'
end
end
......@@ -6,10 +6,10 @@ module Types
graphql_name 'SecurityReportSummarySection'
description 'Represents a section of a summary of a security report'
field :vulnerabilities_count, GraphQL::Types::Int, null: true, description: 'Total number of vulnerabilities.'
field :scanned_resources_count, GraphQL::Types::Int, null: true, description: 'Total number of scanned resources.'
field :scanned_resources, ::Types::ScannedResourceType.connection_type, null: true, description: 'List of the first 20 scanned resources.'
field :scanned_resources_count, GraphQL::Types::Int, null: true, description: 'Total number of scanned resources.'
field :scanned_resources_csv_path, GraphQL::Types::String, null: true, description: 'Path to download all the scanned resources in CSV format.'
field :scans, ::Types::ScanType.connection_type, null: false, description: 'List of security scans ran for the type.'
field :vulnerabilities_count, GraphQL::Types::Int, null: true, description: 'Total number of vulnerabilities.'
end
end
......@@ -6,9 +6,9 @@ module Types
graphql_name 'TimeboxReport'
description 'Represents a historically accurate report about the timebox'
field :stats, ::Types::TimeReportStatsType, null: true,
description: 'Represents the time report stats for the timebox.'
field :burnup_time_series, [::Types::BurnupChartDailyTotalsType], null: true,
description: 'Daily scope and completed totals for burnup charts.'
field :stats, ::Types::TimeReportStatsType, null: true,
description: 'Represents the time report stats for the timebox.'
end
end
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