active_shopify_graphql 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3044e5a4ac6255ea55f7d10e48b0fe9a65825f813712f0cdc14e5993437e24bf
4
- data.tar.gz: f6b9e14fe814887bf0af4b90c174088f7c912ead322cb353fd84a95b2c4799e2
3
+ metadata.gz: bfcae985a03d79f8f96eb49bebceb473b30f74beb3345eaee50e4b855bd025a2
4
+ data.tar.gz: d10731edbeae0fddb323dbb7a4151a0da7e2ede0c717d64f65e0a721cc49e9e8
5
5
  SHA512:
6
- metadata.gz: d5b38dbe06885fc9783e0f0980f1c690ad0a3edc0355f379bff6c0277eb0d69c76c07824d31295a020272b648ee8cd90c812e7399c75dc629650a9681df04b2f
7
- data.tar.gz: 6bdfb30c5888e3532cd19325769d460470c044d5db9c47ebf4b52bec368e8baaccfc65660d2696e04f978bf3d5d178e15a914718925a82b08f655fea8a3d25bf
6
+ metadata.gz: 23418843999e4908113a33af0bed8c9777f2d422067e48a2f333763dfc38ea16b04c746f347204193222fed27b0496311fe845e7faebb62fc0e87a66db131af4
7
+ data.tar.gz: 810bae03627d5705cd6a00927b3aa1d6b40c75dc1b7da6fe3dc8c763e1c07c9e399b671c4c4fcfa61bd44e150e6f6de48afafeab0b591a9cc441e9f9f7010570
@@ -19,10 +19,17 @@ module ActiveShopifyGraphQL::Model::Attributes
19
19
 
20
20
  if @current_loader_context
21
21
  # Store in loader-specific context
22
+ @loader_contexts ||= {}
23
+ @loader_contexts[@current_loader_context] ||= {}
22
24
  @loader_contexts[@current_loader_context][name] = config
23
25
  else
24
- # Store in base attributes
25
- @base_attributes ||= {}
26
+ # Store in base attributes, inheriting from parent if needed
27
+ @base_attributes ||=
28
+ if superclass.instance_variable_defined?(:@base_attributes)
29
+ superclass.instance_variable_get(:@base_attributes).dup
30
+ else
31
+ {}
32
+ end
26
33
  @base_attributes[name] = config
27
34
  end
28
35
 
@@ -6,7 +6,13 @@ module ActiveShopifyGraphQL::Model::Connections
6
6
  included do
7
7
  class << self
8
8
  def connections
9
- @connections ||= {}
9
+ # Inherit connections from parent class if it responds to connections
10
+ @connections ||=
11
+ if superclass.respond_to?(:connections)
12
+ superclass.connections.dup
13
+ else
14
+ {}
15
+ end
10
16
  end
11
17
 
12
18
  attr_writer :connections
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveShopifyGraphQL
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_shopify_graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolò Rebughini