2020-06-18 18:08:58 +00:00
|
|
|
# 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
|
2020-10-30 15:08:59 +00:00
|
|
|
field :opened_merge_requests_url, GraphQL::STRING_TYPE, null: true,
|
2020-10-29 12:08:50 +00:00
|
|
|
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`'
|
2020-10-30 15:08:59 +00:00
|
|
|
field :opened_issues_url, GraphQL::STRING_TYPE, null: true,
|
2020-10-29 12:08:50 +00:00
|
|
|
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`'
|
2020-06-18 18:08:58 +00:00
|
|
|
end
|
|
|
|
end
|