Class: Types::Ci::Catalog::Resources::VersionType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/ci/catalog/resources/version_type.rb

Overview

rubocop: disable Graphql/AuthorizeTypes – Authorization is handled by Ci::Catalog::Resources

Instance Method Summary collapse

Methods inherited from BaseObject

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

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#authorObject



47
48
49
# File 'app/graphql/types/ci/catalog/resources/version_type.rb', line 47

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

#readme_html_resolverObject



42
43
44
45
# File 'app/graphql/types/ci/catalog/resources/version_type.rb', line 42

def readme_html_resolver
  ctx = context.to_h.dup.merge(project: object.project)
  ::MarkupHelper.markdown(object.readme, ctx, { requested_path: object.project.path })
end