blob: 366aa74d4353ef15c5f5d591bf172b4d3b05ec0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
module Gitlab
module Graphql
module Loaders
class BatchRootStorageStatisticsLoader
attr_reader :namespace_id
def initialize(namespace_id)
@namespace_id = namespace_id
end
def find
BatchLoader::GraphQL.for(namespace_id).batch do |namespace_ids, loader|
Namespace::RootStorageStatistics.for_namespace_ids(namespace_ids).each do |statistics|
loader.call(statistics.namespace_id, statistics)
end
end
end
end
end
end
end
|