2020-06-18 18:08:58 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class ReleaseLinksType < BaseObject
|
|
|
|
graphql_name 'ReleaseLinks'
|
|
|
|
|
2021-11-16 12:10:23 +00:00
|
|
|
authorize :read_release
|
2020-06-18 18:08:58 +00:00
|
|
|
|
|
|
|
alias_method :release, :object
|
|
|
|
|
|
|
|
present_using ReleasePresenter
|
|
|
|
|
2021-07-23 12:09:05 +00:00
|
|
|
field :self_url, GraphQL::Types::String, null: true,
|
2021-02-05 15:09:28 +00:00
|
|
|
description: 'HTTP URL of the release.'
|
2021-07-23 12:09:05 +00:00
|
|
|
field :edit_url, GraphQL::Types::String, null: true,
|
2021-02-05 15:09:28 +00:00
|
|
|
description: "HTTP URL of the release's edit page.",
|
2020-06-18 18:08:58 +00:00
|
|
|
authorize: :update_release
|
2021-07-23 12:09:05 +00:00
|
|
|
field :opened_merge_requests_url, GraphQL::Types::String, null: true,
|
2021-11-16 12:10:23 +00:00
|
|
|
description: 'HTTP URL of the merge request page, filtered by this release and `state=open`.',
|
|
|
|
authorize: :download_code
|
2021-07-23 12:09:05 +00:00
|
|
|
field :merged_merge_requests_url, GraphQL::Types::String, null: true,
|
2021-11-16 12:10:23 +00:00
|
|
|
description: 'HTTP URL of the merge request page , filtered by this release and `state=merged`.',
|
|
|
|
authorize: :download_code
|
2021-07-23 12:09:05 +00:00
|
|
|
field :closed_merge_requests_url, GraphQL::Types::String, null: true,
|
2021-11-16 12:10:23 +00:00
|
|
|
description: 'HTTP URL of the merge request page , filtered by this release and `state=closed`.',
|
|
|
|
authorize: :download_code
|
2021-07-23 12:09:05 +00:00
|
|
|
field :opened_issues_url, GraphQL::Types::String, null: true,
|
2021-11-16 12:10:23 +00:00
|
|
|
description: 'HTTP URL of the issues page, filtered by this release and `state=open`.',
|
|
|
|
authorize: :download_code
|
2021-07-23 12:09:05 +00:00
|
|
|
field :closed_issues_url, GraphQL::Types::String, null: true,
|
2021-11-16 12:10:23 +00:00
|
|
|
description: 'HTTP URL of the issues page, filtered by this release and `state=closed`.',
|
|
|
|
authorize: :download_code
|
2020-06-18 18:08:58 +00:00
|
|
|
end
|
|
|
|
end
|