diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-11 18:10:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-11 18:10:36 +0000 |
commit | f020d5dc9bf42fe27b1451af34e7ab3a0c38d344 (patch) | |
tree | 99216543257785d4c444047bcc28d1c1f92db645 /app/graphql | |
parent | e3042fc5ced749e693ccef81b3f5838c55d5480c (diff) | |
download | gitlab-ce-f020d5dc9bf42fe27b1451af34e7ab3a0c38d344.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql')
-rw-r--r-- | app/graphql/types/repository/blob_type.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/graphql/types/repository/blob_type.rb b/app/graphql/types/repository/blob_type.rb index 004bceea154..8ed97d7e663 100644 --- a/app/graphql/types/repository/blob_type.rb +++ b/app/graphql/types/repository/blob_type.rb @@ -32,6 +32,15 @@ module Types field :web_path, GraphQL::STRING_TYPE, null: true, description: 'Web path of the blob.' + field :ide_edit_path, GraphQL::STRING_TYPE, null: true, + description: 'Web path to edit this blob in the Web IDE.' + + field :fork_and_edit_path, GraphQL::STRING_TYPE, null: true, + description: 'Web path to edit this blob using a forked project.' + + field :ide_fork_and_edit_path, GraphQL::STRING_TYPE, null: true, + description: 'Web path to edit this blob in the Web IDE using a forked project.' + field :size, GraphQL::INT_TYPE, null: true, description: 'Size (in bytes) of the blob.' @@ -53,6 +62,9 @@ module Types field :raw_path, GraphQL::STRING_TYPE, null: true, description: 'Web path to download the raw blob.' + field :external_storage_url, GraphQL::STRING_TYPE, null: true, + description: 'Web path to download the raw blob via external storage, if enabled.' + field :replace_path, GraphQL::STRING_TYPE, null: true, description: 'Web path to replace the blob content.' @@ -72,6 +84,10 @@ module Types null: true, calls_gitaly: true + field :can_modify_blob, GraphQL::BOOLEAN_TYPE, null: true, method: :can_modify_blob?, + calls_gitaly: true, + description: 'Whether the current user can modify the blob.' + def raw_text_blob object.data unless object.binary? end |