Commit 590b2ee3 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'issue_346033_1/5' into 'master'

Fix GraphQL/OrderedFields offenses

See merge request gitlab-org/gitlab!81467
parents faea16cc 5f9d3afd
...@@ -38,14 +38,6 @@ GraphQL/OrderedFields: ...@@ -38,14 +38,6 @@ GraphQL/OrderedFields:
- app/graphql/types/notes/diff_position_type.rb - app/graphql/types/notes/diff_position_type.rb
- app/graphql/types/notes/discussion_type.rb - app/graphql/types/notes/discussion_type.rb
- app/graphql/types/notes/note_type.rb - app/graphql/types/notes/note_type.rb
- app/graphql/types/packages/composer/json_type.rb
- app/graphql/types/packages/composer/metadatum_type.rb
- app/graphql/types/packages/conan/file_metadatum_type.rb
- app/graphql/types/packages/conan/metadatum_type.rb
- app/graphql/types/packages/helm/dependency_type.rb
- app/graphql/types/packages/helm/maintainer_type.rb
- app/graphql/types/packages/helm/metadata_type.rb
- app/graphql/types/packages/maven/metadatum_type.rb
- app/graphql/types/packages/nuget/metadatum_type.rb - app/graphql/types/packages/nuget/metadatum_type.rb
- app/graphql/types/packages/package_dependency_link_type.rb - app/graphql/types/packages/package_dependency_link_type.rb
- app/graphql/types/packages/package_file_type.rb - app/graphql/types/packages/package_file_type.rb
......
...@@ -8,9 +8,9 @@ module Types ...@@ -8,9 +8,9 @@ module Types
graphql_name 'PackageComposerJsonType' graphql_name 'PackageComposerJsonType'
description 'Represents a composer JSON file' description 'Represents a composer JSON file'
field :license, GraphQL::Types::String, null: true, description: 'License set in the Composer JSON file.'
field :name, GraphQL::Types::String, null: true, description: 'Name set in the Composer JSON file.' field :name, GraphQL::Types::String, null: true, description: 'Name set in the Composer JSON file.'
field :type, GraphQL::Types::String, null: true, description: 'Type set in the Composer JSON file.' field :type, GraphQL::Types::String, null: true, description: 'Type set in the Composer JSON file.'
field :license, GraphQL::Types::String, null: true, description: 'License set in the Composer JSON file.'
field :version, GraphQL::Types::String, null: true, description: 'Version set in the Composer JSON file.' field :version, GraphQL::Types::String, null: true, description: 'Version set in the Composer JSON file.'
end end
end end
......
...@@ -9,8 +9,8 @@ module Types ...@@ -9,8 +9,8 @@ module Types
authorize :read_package authorize :read_package
field :target_sha, GraphQL::Types::String, null: false, description: 'Target SHA of the package.'
field :composer_json, Types::Packages::Composer::JsonType, null: false, description: 'Data of the Composer JSON file.' field :composer_json, Types::Packages::Composer::JsonType, null: false, description: 'Data of the Composer JSON file.'
field :target_sha, GraphQL::Types::String, null: false, description: 'Target SHA of the package.'
end end
end end
end end
......
...@@ -11,11 +11,11 @@ module Types ...@@ -11,11 +11,11 @@ module Types
authorize :read_package authorize :read_package
field :conan_file_type, ::Types::Packages::Conan::MetadatumFileTypeEnum, null: false, description: 'Type of the Conan file.'
field :conan_package_reference, GraphQL::Types::String, null: true, description: 'Reference of the Conan package.'
field :id, ::Types::GlobalIDType[::Packages::Conan::FileMetadatum], null: false, description: 'ID of the metadatum.' field :id, ::Types::GlobalIDType[::Packages::Conan::FileMetadatum], null: false, description: 'ID of the metadatum.'
field :recipe_revision, GraphQL::Types::String, null: false, description: 'Revision of the Conan recipe.'
field :package_revision, GraphQL::Types::String, null: true, description: 'Revision of the package.' field :package_revision, GraphQL::Types::String, null: true, description: 'Revision of the package.'
field :conan_package_reference, GraphQL::Types::String, null: true, description: 'Reference of the Conan package.' field :recipe_revision, GraphQL::Types::String, null: false, description: 'Revision of the Conan recipe.'
field :conan_file_type, ::Types::Packages::Conan::MetadatumFileTypeEnum, null: false, description: 'Type of the Conan file.'
end end
end end
end end
......
...@@ -9,13 +9,13 @@ module Types ...@@ -9,13 +9,13 @@ module Types
authorize :read_package authorize :read_package
field :id, ::Types::GlobalIDType[::Packages::Conan::Metadatum], null: false, description: 'ID of the metadatum.'
field :created_at, Types::TimeType, null: false, description: 'Date of creation.' 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 :id, ::Types::GlobalIDType[::Packages::Conan::Metadatum], null: false, description: 'ID of the metadatum.'
field :package_username, GraphQL::Types::String, null: false, description: 'Username of the Conan package.'
field :package_channel, GraphQL::Types::String, null: false, description: 'Channel of the Conan package.' field :package_channel, GraphQL::Types::String, null: false, description: 'Channel of the Conan package.'
field :package_username, GraphQL::Types::String, null: false, description: 'Username of the Conan package.'
field :recipe, GraphQL::Types::String, null: false, description: 'Recipe of the Conan package.' field :recipe, GraphQL::Types::String, null: false, description: 'Recipe of the Conan package.'
field :recipe_path, GraphQL::Types::String, null: false, description: 'Recipe path of the Conan package.' field :recipe_path, GraphQL::Types::String, null: false, description: 'Recipe path of the Conan package.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.'
end end
end end
end end
......
...@@ -9,14 +9,14 @@ module Types ...@@ -9,14 +9,14 @@ module Types
description 'Represents a Helm dependency' description 'Represents a Helm dependency'
# Need to be synced with app/validators/json_schemas/helm_metadata.json#dependencies # Need to be synced with app/validators/json_schemas/helm_metadata.json#dependencies
field :name, GraphQL::Types::String, null: true, description: 'Name of the dependency.' field :alias, GraphQL::Types::String, null: true, description: 'Alias of the dependency.', resolver_method: :resolve_alias
field :version, GraphQL::Types::String, null: true, description: 'Version of the dependency.'
field :repository, GraphQL::Types::String, null: true, description: 'Repository of the dependency.'
field :condition, GraphQL::Types::String, null: true, description: 'Condition of the dependency.' field :condition, GraphQL::Types::String, null: true, description: 'Condition of the dependency.'
field :tags, [GraphQL::Types::String], null: true, description: 'Tags of the dependency.'
field :enabled, GraphQL::Types::Boolean, null: true, description: 'Indicates the dependency is enabled.' field :enabled, GraphQL::Types::Boolean, null: true, description: 'Indicates the dependency is enabled.'
field :import_values, [GraphQL::Types::JSON], null: true, description: 'Import-values of the dependency.', hash_key: "import-values" # rubocop:disable Graphql/JSONType field :import_values, [GraphQL::Types::JSON], null: true, description: 'Import-values of the dependency.', hash_key: "import-values" # rubocop:disable Graphql/JSONType
field :alias, GraphQL::Types::String, null: true, description: 'Alias of the dependency.', resolver_method: :resolve_alias field :name, GraphQL::Types::String, null: true, description: 'Name of the dependency.'
field :repository, GraphQL::Types::String, null: true, description: 'Repository of the dependency.'
field :tags, [GraphQL::Types::String], null: true, description: 'Tags of the dependency.'
field :version, GraphQL::Types::String, null: true, description: 'Version of the dependency.'
# field :alias` conflicts with a built-in method # field :alias` conflicts with a built-in method
def resolve_alias def resolve_alias
......
...@@ -9,8 +9,8 @@ module Types ...@@ -9,8 +9,8 @@ module Types
description 'Represents a Helm maintainer' description 'Represents a Helm maintainer'
# Need to be synced with app/validators/json_schemas/helm_metadata.json#maintainers # Need to be synced with app/validators/json_schemas/helm_metadata.json#maintainers
field :name, GraphQL::Types::String, null: true, description: 'Name of the maintainer.'
field :email, GraphQL::Types::String, null: true, description: 'Email of the maintainer.' field :email, GraphQL::Types::String, null: true, description: 'Email of the maintainer.'
field :name, GraphQL::Types::String, null: true, description: 'Name of the maintainer.'
field :url, GraphQL::Types::String, null: true, description: 'URL of the maintainer.' field :url, GraphQL::Types::String, null: true, description: 'URL of the maintainer.'
end end
end end
......
...@@ -9,23 +9,23 @@ module Types ...@@ -9,23 +9,23 @@ module Types
description 'Represents the contents of a Helm Chart.yml file' description 'Represents the contents of a Helm Chart.yml file'
# Need to be synced with app/validators/json_schemas/helm_metadata.json # Need to be synced with app/validators/json_schemas/helm_metadata.json
field :name, GraphQL::Types::String, null: false, description: 'Name of the chart.' field :annotations, GraphQL::Types::JSON, null: true, description: 'Annotations for the chart.' # rubocop:disable Graphql/JSONType
field :home, GraphQL::Types::String, null: true, description: 'URL of the home page.'
field :sources, [GraphQL::Types::String], null: true, description: 'URLs of the source code for the chart.'
field :version, GraphQL::Types::String, null: false, description: 'Version of the chart.'
field :description, GraphQL::Types::String, null: true, description: 'Description of the chart.'
field :keywords, [GraphQL::Types::String], null: true, description: 'Keywords for the chart.'
field :maintainers, [Types::Packages::Helm::MaintainerType], null: true, description: 'Maintainers of the chart.'
field :icon, GraphQL::Types::String, null: true, description: 'URL to an SVG or PNG image for the chart.'
field :api_version, GraphQL::Types::String, null: false, description: 'API version of the chart.', hash_key: "apiVersion" field :api_version, GraphQL::Types::String, null: false, description: 'API version of the chart.', hash_key: "apiVersion"
field :condition, GraphQL::Types::String, null: true, description: 'Condition for the chart.'
field :tags, GraphQL::Types::String, null: true, description: 'Tags for the chart.'
field :app_version, GraphQL::Types::String, null: true, description: 'App version of the chart.', hash_key: "appVersion" field :app_version, GraphQL::Types::String, null: true, description: 'App version of the chart.', hash_key: "appVersion"
field :condition, GraphQL::Types::String, null: true, description: 'Condition for the chart.'
field :dependencies, [Types::Packages::Helm::DependencyType], null: true, description: 'Dependencies of the chart.'
field :deprecated, GraphQL::Types::Boolean, null: true, description: 'Indicates if the chart is deprecated.' field :deprecated, GraphQL::Types::Boolean, null: true, description: 'Indicates if the chart is deprecated.'
field :annotations, GraphQL::Types::JSON, null: true, description: 'Annotations for the chart.' # rubocop:disable Graphql/JSONType field :description, GraphQL::Types::String, null: true, description: 'Description of the chart.'
field :home, GraphQL::Types::String, null: true, description: 'URL of the home page.'
field :icon, GraphQL::Types::String, null: true, description: 'URL to an SVG or PNG image for the chart.'
field :keywords, [GraphQL::Types::String], null: true, description: 'Keywords for the chart.'
field :kube_version, GraphQL::Types::String, null: true, description: 'Kubernetes versions for the chart.', hash_key: "kubeVersion" field :kube_version, GraphQL::Types::String, null: true, description: 'Kubernetes versions for the chart.', hash_key: "kubeVersion"
field :dependencies, [Types::Packages::Helm::DependencyType], null: true, description: 'Dependencies of the chart.' field :maintainers, [Types::Packages::Helm::MaintainerType], null: true, description: 'Maintainers of the chart.'
field :name, GraphQL::Types::String, null: false, description: 'Name of the chart.'
field :sources, [GraphQL::Types::String], null: true, description: 'URLs of the source code for the chart.'
field :tags, GraphQL::Types::String, null: true, description: 'Tags for the chart.'
field :type, GraphQL::Types::String, null: true, description: 'Type of the chart.', hash_key: "appVersion" field :type, GraphQL::Types::String, null: true, description: 'Type of the chart.', hash_key: "appVersion"
field :version, GraphQL::Types::String, null: false, description: 'Version of the chart.'
end end
end end
end end
......
...@@ -9,13 +9,13 @@ module Types ...@@ -9,13 +9,13 @@ module Types
authorize :read_package authorize :read_package
field :id, ::Types::GlobalIDType[::Packages::Maven::Metadatum], null: false, description: 'ID of the metadatum.'
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 :path, GraphQL::Types::String, null: false, description: 'Path of the Maven package.'
field :app_group, GraphQL::Types::String, null: false, description: 'App group of the Maven package.' field :app_group, GraphQL::Types::String, null: false, description: 'App group of the Maven package.'
field :app_version, GraphQL::Types::String, null: true, description: 'App version of the Maven package.'
field :app_name, GraphQL::Types::String, null: false, description: 'App name of the Maven package.' field :app_name, GraphQL::Types::String, null: false, description: 'App name of the Maven package.'
field :app_version, GraphQL::Types::String, null: true, description: 'App version of the Maven package.'
field :created_at, Types::TimeType, null: false, description: 'Date of creation.'
field :id, ::Types::GlobalIDType[::Packages::Maven::Metadatum], null: false, description: 'ID of the metadatum.'
field :path, GraphQL::Types::String, null: false, description: 'Path of the Maven package.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.'
end end
end end
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