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