2020-06-10 12:08:58 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class EvidenceType < BaseObject
|
|
|
|
graphql_name 'ReleaseEvidence'
|
|
|
|
description 'Evidence for a release'
|
|
|
|
|
|
|
|
authorize :download_code
|
|
|
|
|
|
|
|
present_using Releases::EvidencePresenter
|
|
|
|
|
|
|
|
field :id, GraphQL::ID_TYPE, null: false,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'ID of the evidence.'
|
2020-06-10 12:08:58 +00:00
|
|
|
field :sha, GraphQL::STRING_TYPE, null: true,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'SHA1 ID of the evidence hash.'
|
2020-06-10 12:08:58 +00:00
|
|
|
field :filepath, GraphQL::STRING_TYPE, null: true,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'URL from where the evidence can be downloaded.'
|
2020-06-10 12:08:58 +00:00
|
|
|
field :collected_at, Types::TimeType, null: true,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'Timestamp when the evidence was collected.'
|
2020-06-10 12:08:58 +00:00
|
|
|
end
|
|
|
|
end
|