debian-mirror-gitlab/app/graphql/types/evidence_type.rb

22 lines
693 B
Ruby
Raw Normal View History

2020-06-23 00:09:42 +05:30
# frozen_string_literal: true
module Types
class EvidenceType < BaseObject
graphql_name 'ReleaseEvidence'
description 'Evidence for a release'
authorize :download_code
present_using Releases::EvidencePresenter
2021-10-27 15:23:28 +05:30
field :id, GraphQL::Types::ID, null: false,
2021-03-11 19:13:27 +05:30
description: 'ID of the evidence.'
2021-10-27 15:23:28 +05:30
field :sha, GraphQL::Types::String, null: true,
2021-03-11 19:13:27 +05:30
description: 'SHA1 ID of the evidence hash.'
2021-10-27 15:23:28 +05:30
field :filepath, GraphQL::Types::String, null: true,
2021-03-11 19:13:27 +05:30
description: 'URL from where the evidence can be downloaded.'
2020-06-23 00:09:42 +05:30
field :collected_at, Types::TimeType, null: true,
2021-03-11 19:13:27 +05:30
description: 'Timestamp when the evidence was collected.'
2020-06-23 00:09:42 +05:30
end
end