Commit 25d5aa8e authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'sh-rename-preloads-graphql-lookahead' into 'master'

Rename preloads variable in GraphQL lookahead

See merge request gitlab-org/gitlab!50329
parents 3067e314 d11918de
......@@ -20,11 +20,11 @@ module LooksAhead
includes = preloads.each.flat_map do |name, requirements|
selection&.selects?(name) ? requirements : []
end
preloads = (unconditional_includes + includes).uniq
all_preloads = (unconditional_includes + includes).uniq
return query if preloads.empty?
return query if all_preloads.empty?
query.preload(*preloads) # rubocop: disable CodeReuse/ActiveRecord
query.preload(*all_preloads) # rubocop: disable CodeReuse/ActiveRecord
end
private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment