rename Sources:ActiveRecord to Dataloader::Source

This commit is contained in:
João Geonizeli
2021-08-14 18:22:00 -03:00
parent f97e0ab1de
commit 98a2011445
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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