2019-05-22 11:43:35 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
module Types
|
|
|
|
module Tree
|
2019-06-18 16:31:06 +00:00
|
|
|
# rubocop: disable Graphql/AuthorizeTypes
|
|
|
|
# This is presented through `Repository` that has its own authorization
|
2019-05-22 11:43:35 +00:00
|
|
|
class TreeEntryType < BaseObject
|
|
|
|
implements Types::Tree::EntryType
|
|
|
|
|
2019-06-04 13:38:18 +00:00
|
|
|
present_using TreeEntryPresenter
|
|
|
|
|
2019-05-22 11:43:35 +00:00
|
|
|
graphql_name 'TreeEntry'
|
|
|
|
description 'Represents a directory'
|
2019-06-04 13:38:18 +00:00
|
|
|
|
2020-01-06 09:07:42 +00:00
|
|
|
field :web_url, GraphQL::STRING_TYPE, null: true,
|
2021-02-05 15:09:28 +00:00
|
|
|
description: 'Web URL for the tree entry (directory).'
|
2020-07-23 15:09:28 +00:00
|
|
|
field :web_path, GraphQL::STRING_TYPE, null: true,
|
2021-02-05 15:09:28 +00:00
|
|
|
description: 'Web path for the tree entry (directory).'
|
2019-05-22 11:43:35 +00:00
|
|
|
end
|
2019-06-18 16:31:06 +00:00
|
|
|
# rubocop: enable Graphql/AuthorizeTypes
|
2019-05-22 11:43:35 +00:00
|
|
|
end
|
|
|
|
end
|