diff options
author | Phil Hughes <me@iamphill.com> | 2019-06-10 09:05:16 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-06-10 09:05:44 +0100 |
commit | 522c01972c7f46dbe8a2cd7569784fa255997c91 (patch) | |
tree | ab726ad68410c1c69d12bf8dc2aa527f2a05bd20 /app/graphql | |
parent | 25420de654b5581ccf6254be769a5e031446eced (diff) | |
download | gitlab-ce-522c01972c7f46dbe8a2cd7569784fa255997c91.tar.gz |
Add LFS blob ID to GraphQL blob type
Diffstat (limited to 'app/graphql')
-rw-r--r-- | app/graphql/types/tree/blob_type.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/graphql/types/tree/blob_type.rb b/app/graphql/types/tree/blob_type.rb index f2b7d5df2b2..ba191b59132 100644 --- a/app/graphql/types/tree/blob_type.rb +++ b/app/graphql/types/tree/blob_type.rb @@ -9,6 +9,9 @@ module Types graphql_name 'Blob' field :web_url, GraphQL::STRING_TYPE, null: true + field :lfs_oid, GraphQL::STRING_TYPE, null: true, resolve: -> (blob, args, ctx) do + Gitlab::Graphql::Loaders::BatchCommitLoader.new(blob.repository, blob.id).find + end end end end |