diff --git a/Gemfile.lock b/Gemfile.lock index 50bb5b3..12abbab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - graphql-eager_loader (0.2.0) + graphql-eager_loader (0.2.1) GEM remote: https://rubygems.org/ diff --git a/lib/graphql/eager_loader/builder.rb b/lib/graphql/eager_loader/builder.rb index 8f0b8c3..a02295b 100644 --- a/lib/graphql/eager_loader/builder.rb +++ b/lib/graphql/eager_loader/builder.rb @@ -49,7 +49,9 @@ def initialize(selection:, model:) end def includes - self.class.call(selections: selection.selections, model: includes_model) + hash = {} + hash[:blob] = {} if active_storage_attachment? + hash.merge self.class.call(selections: selection.selections, model: includes_model) end def association? diff --git a/lib/graphql/eager_loader/version.rb b/lib/graphql/eager_loader/version.rb index 039869a..5ad481e 100644 --- a/lib/graphql/eager_loader/version.rb +++ b/lib/graphql/eager_loader/version.rb @@ -2,6 +2,6 @@ module Graphql module EagerLoader - VERSION = '0.2.0' + VERSION = '0.2.1' end end diff --git a/spec/graphql/eager_loader_spec.rb b/spec/graphql/eager_loader_spec.rb index f07cd90..b5b72a7 100644 --- a/spec/graphql/eager_loader_spec.rb +++ b/spec/graphql/eager_loader_spec.rb @@ -91,7 +91,7 @@ expect(options).to eq( proposal_documents: {}, jobs: { user: {} }, - photo_attachment: {} + photo_attachment: { blob: {} } ) end end