rename Sources:ActiveRecord to Dataloader::Source
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Sources
|
||||
class ActiveRecord < GraphQL::Dataloader::Source
|
||||
module Dataloader
|
||||
class Source < GraphQL::Dataloader::Source
|
||||
# rubocop:disable Lint/MissingSuper
|
||||
def initialize(model_class)
|
||||
@model_class = model_class
|
||||
@@ -11,7 +11,7 @@ module Types
|
||||
|
||||
field :currency, CurrencyType, null: false
|
||||
def currency
|
||||
dataloader.with(Sources::ActiveRecord, Currency).load(object.currency_id)
|
||||
dataloader.with(Dataloader::Source, Currency).load(object.currency_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user