2019-09-04 21:01:54 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class RepositoryType < BaseObject
|
|
|
|
graphql_name 'Repository'
|
|
|
|
|
|
|
|
authorize :download_code
|
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
field :root_ref, GraphQL::STRING_TYPE, null: true, calls_gitaly: true # rubocop:disable Graphql/Descriptions
|
|
|
|
field :empty, GraphQL::BOOLEAN_TYPE, null: false, method: :empty?, calls_gitaly: true # rubocop:disable Graphql/Descriptions
|
|
|
|
field :exists, GraphQL::BOOLEAN_TYPE, null: false, method: :exists? # rubocop:disable Graphql/Descriptions
|
|
|
|
field :tree, Types::Tree::TreeType, null: true, resolver: Resolvers::TreeResolver, calls_gitaly: true # rubocop:disable Graphql/Descriptions
|
2019-09-04 21:01:54 +05:30
|
|
|
end
|
|
|
|
end
|