Class: Types::ReleaseType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/release_type.rb

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#authorObject



57
58
59
# File 'app/graphql/types/release_type.rb', line 57

def author
  Gitlab::Graphql::Loaders::BatchModelLoader.new(User, release.author_id).find
end

#commitObject



61
62
63
64
65
# File 'app/graphql/types/release_type.rb', line 61

def commit
  return if release.sha.nil?

  release.project.commit_by(oid: release.sha)
end