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


53
54
55
# File 'app/graphql/types/release_type.rb', line 53

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

#commitObject


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

def commit
  return if release.sha.nil?

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