diff --git a/app/graphql/loaders/association.rb b/app/graphql/loaders/association.rb index 693bc9b58..cf7257a6a 100644 --- a/app/graphql/loaders/association.rb +++ b/app/graphql/loaders/association.rb @@ -42,7 +42,10 @@ module Loaders end def preload_association(records) - ::ActiveRecord::Associations::Preloader.new.preload(records, @association_schema) + ::ActiveRecord::Associations::Preloader.new( + records: records, + associations: @association_schema + ).call end def read_association(record)