Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/release_assets_type.rb')
-rw-r--r--app/graphql/types/release_assets_type.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/graphql/types/release_assets_type.rb b/app/graphql/types/release_assets_type.rb
new file mode 100644
index 00000000000..58ad05b5365
--- /dev/null
+++ b/app/graphql/types/release_assets_type.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module Types
+ class ReleaseAssetsType < BaseObject
+ graphql_name 'ReleaseAssets'
+
+ authorize :read_release
+
+ alias_method :release, :object
+
+ present_using ReleasePresenter
+
+ field :assets_count, GraphQL::INT_TYPE, null: true,
+ description: 'Number of assets of the release'
+ field :links, Types::ReleaseLinkType.connection_type, null: true,
+ description: 'Asset links of the release'
+ field :sources, Types::ReleaseSourceType.connection_type, null: true,
+ description: 'Sources of the release'
+ end
+end