Class: Types::ReleaseAssetLinkType

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

Instance Method Summary collapse

Methods inherited from BaseObject

#current_user, #id

Instance Method Details

#direct_asset_urlObject


24
25
26
27
28
29
30
31
# File 'app/graphql/types/release_asset_link_type.rb', line 24

def direct_asset_url
  return object.url unless object.filepath

  release = object.release
  project = release.project

  Gitlab::Routing.url_helpers.project_release_url(project, release) << object.filepath
end