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'
|
|
|
|
|
2021-11-04 18:09:40 +00:00
|
|
|
authorize :read_release_evidence
|
2020-06-10 12:08:58 +00:00
|
|
|
|
|
|
|
present_using Releases::EvidencePresenter
|
|
|
|
|
2021-07-22 09:08:22 +00:00
|
|
|
field :id, GraphQL::Types::ID, null: false,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'ID of the evidence.'
|
2021-07-22 09:08:22 +00:00
|
|
|
field :sha, GraphQL::Types::String, null: true,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'SHA1 ID of the evidence hash.'
|
2021-07-22 09:08:22 +00:00
|
|
|
field :filepath, GraphQL::Types::String, 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
|