summaryrefslogtreecommitdiff
path: root/app/graphql/types/release_links_type.rb
blob: f61a16f5b676e86ab9d51508a67039eff273e23d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module Types
  class ReleaseLinksType < BaseObject
    graphql_name 'ReleaseLinks'

    authorize :download_code

    alias_method :release, :object

    present_using ReleasePresenter

    field :self_url, GraphQL::STRING_TYPE, null: true,
          description: 'HTTP URL of the release'
    field :merge_requests_url, GraphQL::STRING_TYPE, null: true,
          description: 'HTTP URL of the merge request page filtered by this release'
    field :issues_url, GraphQL::STRING_TYPE, null: true,
          description: 'HTTP URL of the issues page filtered by this release'
    field :edit_url, GraphQL::STRING_TYPE, null: true,
          description: "HTTP URL of the release's edit page",
          authorize: :update_release
  end
end