graphql_includable 0.1.3 → 0.1.4
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 +4 -4
- data/lib/graphql_includable.rb +3 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 422e58558f8fad15867c7e3310cb466d1da7ad87
|
4
|
+
data.tar.gz: d6872a079bc7fd67b241736ef7214a2f1aefe806
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e27a2d8c049be3eda8248860aecc254e67944c908a32c5b06a9af5ceb7f4f748495620b9dee6725f9be5b04bfcb34e677625a1c935f59258fb30907e19e7680
|
7
|
+
data.tar.gz: 509fdbaa84c06ce4e4bc8ccff1d653e53fc09f7b8fd82cb12b060d1d6b9a7ecf69a221d6f5d43c3d979e5cb0fdfb3d75e25dba9cb89c203b7fa31ee3dc17c4d2
|
data/lib/graphql_includable.rb
CHANGED
@@ -64,18 +64,11 @@ module GraphQLIncludable
|
|
64
64
|
|
65
65
|
if association
|
66
66
|
child_includes = includes_from_irep_node(child_node)
|
67
|
-
|
68
67
|
if node_has_active_record_children(child_node) && child_includes.size > 0
|
69
|
-
|
70
|
-
|
71
|
-
nested_includes[delegated_model_name][raw_association_name] = child_includes
|
72
|
-
else
|
73
|
-
nested_includes[association_name] = child_includes
|
74
|
-
end
|
75
|
-
elsif specified_includes
|
76
|
-
includes << specified_includes
|
68
|
+
child_key = delegated_model_name || association_name
|
69
|
+
nested_includes[child_key] = wrap_delegate(child_includes, delegated_model_name, raw_association_name)
|
77
70
|
else
|
78
|
-
includes << association_name
|
71
|
+
includes << wrap_delegate(specified_includes || association_name, delegated_model_name)
|
79
72
|
end
|
80
73
|
elsif specified_includes
|
81
74
|
includes << specified_includes
|
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.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Rouse
|
@@ -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.
|
43
|
+
rubygems_version: 2.6.12
|
44
44
|
signing_key:
|
45
45
|
specification_version: 4
|
46
46
|
summary: An ActiveSupport::Concern for GraphQL Ruby to eager-load query data
|