summaryrefslogtreecommitdiff
path: root/app/graphql/types/tree/entry_type.rb
blob: c0150b77c55373a0a25979f8922a1ec86ec03e14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true
module Types
  module Tree
    module EntryType
      include Types::BaseInterface

      field :id, GraphQL::ID_TYPE, null: false,
            description: 'ID of the entry.'
      field :sha, GraphQL::STRING_TYPE, null: false,
            description: 'Last commit SHA for the entry.', method: :id
      field :name, GraphQL::STRING_TYPE, null: false,
            description: 'Name of the entry.'
      field :type, Tree::TypeEnum, null: false,
            description: 'Type of tree entry.'
      field :path, GraphQL::STRING_TYPE, null: false,
            description: 'Path of the entry.'
      field :flat_path, GraphQL::STRING_TYPE, null: false,
            description: 'Flat path of the entry.'
    end
  end
end