diff options
Diffstat (limited to 'app/graphql/types/dependency_proxy')
-rw-r--r-- | app/graphql/types/dependency_proxy/manifest_type.rb | 4 | ||||
-rw-r--r-- | app/graphql/types/dependency_proxy/manifest_type_enum.rb | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/app/graphql/types/dependency_proxy/manifest_type.rb b/app/graphql/types/dependency_proxy/manifest_type.rb index ab22f540f48..f7e751e30d3 100644 --- a/app/graphql/types/dependency_proxy/manifest_type.rb +++ b/app/graphql/types/dependency_proxy/manifest_type.rb @@ -15,6 +15,10 @@ module Types 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 :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.' + field :status, + Types::DependencyProxy::ManifestTypeEnum, + null: false, + description: "Status of the manifest (#{::DependencyProxy::Manifest.statuses.keys.join(', ')})" def image_name object.file_name.chomp(File.extname(object.file_name)) diff --git a/app/graphql/types/dependency_proxy/manifest_type_enum.rb b/app/graphql/types/dependency_proxy/manifest_type_enum.rb new file mode 100644 index 00000000000..ddd1652eeea --- /dev/null +++ b/app/graphql/types/dependency_proxy/manifest_type_enum.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Types + class DependencyProxy::ManifestTypeEnum < BaseEnum + graphql_name 'DependencyProxyManifestStatus' + + ::DependencyProxy::Manifest.statuses.keys.each do |status| + value status.upcase, description: "Dependency proxy manifest has a status of #{status}.", value: status + end + end +end |