diff options
Diffstat (limited to 'app/graphql/types/release_asset_link_type.rb')
-rw-r--r-- | app/graphql/types/release_asset_link_type.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/graphql/types/release_asset_link_type.rb b/app/graphql/types/release_asset_link_type.rb new file mode 100644 index 00000000000..21f1bd50cff --- /dev/null +++ b/app/graphql/types/release_asset_link_type.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Types + class ReleaseAssetLinkType < BaseObject + graphql_name 'ReleaseAssetLink' + description 'Represents an asset link associated with a release' + + authorize :read_release + + field :id, GraphQL::ID_TYPE, null: false, + description: 'ID of the link' + field :name, GraphQL::STRING_TYPE, null: true, + description: 'Name of the link' + field :url, GraphQL::STRING_TYPE, null: true, + description: 'URL of the link' + field :link_type, Types::ReleaseAssetLinkTypeEnum, null: true, + description: 'Type of the link: `other`, `runbook`, `image`, `package`; defaults to `other`' + field :external, GraphQL::BOOLEAN_TYPE, null: true, method: :external?, + description: 'Indicates the link points to an external resource' + end +end |