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

release_links_type.rb « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a51b80e1e13a175d9a52bf3b4a89f8e60db6f5e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 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 :edit_url, GraphQL::STRING_TYPE, null: true,
          description: "HTTP URL of the release's edit page.",
          authorize: :update_release
    field :opened_merge_requests_url, GraphQL::STRING_TYPE, null: true,
          description: 'HTTP URL of the merge request page, filtered by this release and `state=open`.'
    field :merged_merge_requests_url, GraphQL::STRING_TYPE, null: true,
          description: 'HTTP URL of the merge request page , filtered by this release and `state=merged`.'
    field :closed_merge_requests_url, GraphQL::STRING_TYPE, null: true,
          description: 'HTTP URL of the merge request page , filtered by this release and `state=closed`.'
    field :opened_issues_url, GraphQL::STRING_TYPE, null: true,
          description: 'HTTP URL of the issues page, filtered by this release and `state=open`.'
    field :closed_issues_url, GraphQL::STRING_TYPE, null: true,
          description: 'HTTP URL of the issues page, filtered by this release and `state=closed`.'
  end
end