diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 11:59:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 11:59:07 +0000 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /app/graphql/types/tree/blob_type.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) | |
download | gitlab-ce-8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca.tar.gz |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'app/graphql/types/tree/blob_type.rb')
-rw-r--r-- | app/graphql/types/tree/blob_type.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/graphql/types/tree/blob_type.rb b/app/graphql/types/tree/blob_type.rb index cc6bf7b4f00..a7b90d2533b 100644 --- a/app/graphql/types/tree/blob_type.rb +++ b/app/graphql/types/tree/blob_type.rb @@ -15,13 +15,14 @@ module Types field :web_path, GraphQL::STRING_TYPE, null: true, description: 'Web path of the blob' field :lfs_oid, GraphQL::STRING_TYPE, null: true, - description: 'LFS ID of the blob', - resolve: -> (blob, args, ctx) do - Gitlab::Graphql::Loaders::BatchLfsOidLoader.new(blob.repository, blob.id).find - end + description: 'LFS ID of the blob' field :mode, GraphQL::STRING_TYPE, null: true, description: 'Blob mode in numeric format' - # rubocop: enable Graphql/AuthorizeTypes + + def lfs_oid + Gitlab::Graphql::Loaders::BatchLfsOidLoader.new(object.repository, object.id).find + end end + # rubocop: enable Graphql/AuthorizeTypes end end |