graphql_includable 0.1.2 → 0.1.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/graphql_includable.rb +4 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 783eb47a03d6cadff472b54bb0c94f08707929ec
4
- data.tar.gz: 254933ebe759d8092c86ef3cffb726c400c5af36
3
+ metadata.gz: 71f63a92656363034ac25b4ca3d74b73d3eeacc8
4
+ data.tar.gz: fbaf39008e49807c40d5e52c098ecc5c24805c87
5
5
  SHA512:
6
- metadata.gz: 8094f557f919e0409fd2d1b7328b6544f1eeb22952ba4f4a04fe6caf3f1f4075d19f11684dd84db6564ab3347419ea7cb4515ebc7f3e6e54519d793633d243ca
7
- data.tar.gz: 184685006ff5e56b9582ce2bb53d7c96d04306551d54cba866baeb9c1012386bdd295151f3c6107989bb1813ca6f7482c9b802c77e74e8d0454624e38be2be80
6
+ metadata.gz: 20898d3e9fe3ac991bf7ff93262e6f071f02aa6982bae48d0a7f73eebf1b16c89a2825348612ed6a319228e685df84696fe18f129eb85674704f8865faf0afc0
7
+ data.tar.gz: 098ef2c5f17a804c0b1602ad8d7e7a80ef949e6036ac01fa15b2cb88fd0f3539765d61a02d1e0a8babce862e72448c6e9181b036a3f2d9e2581813ad7c8116a1
@@ -56,7 +56,8 @@ module GraphQLIncludable
56
56
 
57
57
  node.scoped_children[return_type].each do |child_name, child_node|
58
58
  specified_includes = child_node.definitions[0].metadata[:includes]
59
- raw_association_name = specified_includes || (child_node.definitions[0].property || child_name).to_sym
59
+ raw_association_name = (child_node.definitions[0].property || child_name).to_sym
60
+ raw_association_name = specified_includes if specified_includes.is_a?(Symbol)
60
61
  delegated_model_name = get_delegated_model(return_model, raw_association_name)
61
62
  association_name = delegated_model_name || raw_association_name
62
63
  association = return_model.reflect_on_association(association_name)
@@ -71,6 +72,8 @@ module GraphQLIncludable
71
72
  else
72
73
  nested_includes[association_name] = child_includes
73
74
  end
75
+ elsif specified_includes
76
+ includes << specified_includes
74
77
  else
75
78
  includes << association_name
76
79
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql_includable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Rouse
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-11-07 00:00:00.000000000 Z
12
+ date: 2017-11-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email:
@@ -40,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  version: '0'
41
41
  requirements: []
42
42
  rubyforge_project:
43
- rubygems_version: 2.6.12
43
+ rubygems_version: 2.6.10
44
44
  signing_key:
45
45
  specification_version: 4
46
46
  summary: An ActiveSupport::Concern for GraphQL Ruby to eager-load query data