2020-05-05 09:09:37 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
# rubocop: disable Graphql/AuthorizeTypes
|
|
|
|
class BranchType < BaseObject
|
|
|
|
graphql_name 'Branch'
|
|
|
|
|
|
|
|
field :name,
|
|
|
|
GraphQL::STRING_TYPE,
|
|
|
|
null: false,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'Name of the branch.'
|
2020-05-05 09:09:37 +00:00
|
|
|
|
|
|
|
field :commit, Types::CommitType,
|
|
|
|
null: true, resolver: Resolvers::BranchCommitResolver,
|
2021-01-22 21:09:10 +00:00
|
|
|
description: 'Commit for the branch.'
|
2020-05-05 09:09:37 +00:00
|
|
|
end
|
|
|
|
# rubocop: enable Graphql/AuthorizeTypes
|
|
|
|
end
|