# frozen_string_literal: true

module Types
  module Vulnerability
    # rubocop: disable Graphql/AuthorizeTypes
    class IssueLinkType < BaseObject
      graphql_name 'VulnerabilityIssueLink'
      description 'Represents an issue link of a vulnerability.'

      field :id, GraphQL::ID_TYPE, null: false,
            description: 'GraphQL ID of the vulnerability'

      field :link_type, ::Types::Vulnerability::IssueLinkTypeEnum, null: false,
            description: "Type of the issue link"

      field :issue, ::Types::IssueType, null: false,
            description: 'The issue attached to issue link'
    end
    # rubocop: enable Graphql/AuthorizeTypes
  end
end
