# frozen_string_literal: true

module Types
  module VulnerabilityDetails
    # rubocop: disable Graphql/AuthorizeTypes
    class CodeType < BaseType
      graphql_name 'VulnerabilityDetailCode'
      description 'Represents the vulnerability details code field'

      field :lang, GraphQL::STRING_TYPE, null: true,
            description: 'Language of the code.'

      field :value, GraphQL::STRING_TYPE, null: false,
            description: 'Source code.'
    end
  end
end
