summaryrefslogtreecommitdiff
path: root/app/graphql/types/release_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/release_type.rb')
-rw-r--r--app/graphql/types/release_type.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/graphql/types/release_type.rb b/app/graphql/types/release_type.rb
index 3d8e5a93c68..a0703b96a36 100644
--- a/app/graphql/types/release_type.rb
+++ b/app/graphql/types/release_type.rb
@@ -3,6 +3,7 @@
module Types
class ReleaseType < BaseObject
graphql_name 'Release'
+ description 'Represents a release'
authorize :read_release
@@ -10,10 +11,12 @@ module Types
present_using ReleasePresenter
- field :tag_name, GraphQL::STRING_TYPE, null: false, method: :tag,
- description: 'Name of the tag associated with the release'
+ field :tag_name, GraphQL::STRING_TYPE, null: true, method: :tag,
+ description: 'Name of the tag associated with the release',
+ authorize: :download_code
field :tag_path, GraphQL::STRING_TYPE, null: true,
- description: 'Relative web path to the tag associated with the release'
+ description: 'Relative web path to the tag associated with the release',
+ authorize: :download_code
field :description, GraphQL::STRING_TYPE, null: true,
description: 'Description (also known as "release notes") of the release'
markdown_field :description_html, null: true
@@ -25,6 +28,8 @@ module Types
description: 'Timestamp of when the release was released'
field :assets, Types::ReleaseAssetsType, null: true, method: :itself,
description: 'Assets of the release'
+ field :links, Types::ReleaseLinksType, null: true, method: :itself,
+ description: 'Links of the release'
field :milestones, Types::MilestoneType.connection_type, null: true,
description: 'Milestones associated to the release'
field :evidences, Types::EvidenceType.connection_type, null: true,
@@ -39,8 +44,7 @@ module Types
field :commit, Types::CommitType, null: true,
complexity: 10, calls_gitaly: true,
- description: 'The commit associated with the release',
- authorize: :reporter_access
+ description: 'The commit associated with the release'
def commit
return if release.sha.nil?