Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql_activerecord_resolvers/extensions.rb

Class Method Summary collapse

Class Method Details

.preload_graphql_associations(ctx) ⇒ Object



6
7
8
9
# File 'lib/graphql_activerecord_resolvers/extensions.rb', line 6

def self.preload_graphql_associations(ctx)
  association_tree = GraphQLActiveRecordResolvers::AssociationTree.new(self, ctx)
  includes(association_tree.includes_arguments)
end