summaryrefslogtreecommitdiff
path: root/app/graphql/types/ci/recent_failures_type.rb
blob: f56b09390860df3ee05691ad1e877bfffa653902 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module Types
  module Ci
    # rubocop: disable Graphql/AuthorizeTypes
    class RecentFailuresType < BaseObject
      graphql_name 'RecentFailures'
      description 'Recent failure history of a test case.'

      connection_type_class(Types::CountableConnectionType)

      field :count, GraphQL::Types::Int, null: true,
        description: 'Number of times the test case has failed in the past 14 days.'

      field :base_branch, GraphQL::Types::String, null: true,
        description: 'Name of the base branch of the project.'
    end
    # rubocop: enable Graphql/AuthorizeTypes
  end
end