Class: Types::Packages::PackageFileType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/packages/package_file_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

#file_metadataObject

NOTE: This method must be kept in sync with the union type: `Types::Packages::FileMetadataType`.

`Types::Packages::FileMetadataType.resolve_type(metadata, ctx)` must never raise.


26
27
28
29
30
31
32
33
34
35
# File 'app/graphql/types/packages/package_file_type.rb', line 26

def 
  case object.package.package_type
  when 'conan'
    object.conan_file_metadatum
  when 'helm'
    object.helm_file_metadatum
  else
    nil
  end
end