Welcome to mirror list, hosted at ThFree Co, Russian Federation.

repository_type.rb « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f0c25e13a268426f2ab28d0953d1dd5932938497 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Types
  class RepositoryType < BaseObject
    graphql_name 'Repository'

    authorize :download_code

    field :root_ref, GraphQL::STRING_TYPE, null: true, calls_gitaly: true,
          description: 'Default branch of the repository'
    field :empty, GraphQL::BOOLEAN_TYPE, null: false, method: :empty?, calls_gitaly: true,
          description: 'Indicates repository has no visible content'
    field :exists, GraphQL::BOOLEAN_TYPE, null: false, method: :exists?,
          description: 'Indicates a corresponding Git repository exists on disk'
    field :tree, Types::Tree::TreeType, null: true, resolver: Resolvers::TreeResolver, calls_gitaly: true,
          description: 'Tree of the repository'
  end
end