graphql_lazy_load 0.3.0 → 0.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a1d247cda02efb8ff8695c9bd502ed4a8707c2f1419ffbb5be8502a59bfa842
|
4
|
+
data.tar.gz: 28fd830a789911d974ba640e2eae88074b90d3af19977271a47d4906cca342d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fb82b1650aa1601cd65ac7d04b976558bba510cabeb9e62ce92df5b157bf27955a3080de6a92b991987237c6d0e5427ef6e28fd9c1667efbeed761a8db27903
|
7
|
+
data.tar.gz: 9d980b8155abed6d6d25bea9c20fe5e13a6095ef3a46c8fdcda4bbe9f8cb17f1ab9e337635d1d503e29fd228980d59ac02d39fa5c4ba412c3c8ff5457221fe68
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
graphql_lazy_load (0.3.
|
4
|
+
graphql_lazy_load (0.3.1)
|
5
5
|
activerecord (>= 4.1.16)
|
6
6
|
graphql (>= 1.3.0)
|
7
7
|
|
@@ -36,25 +36,25 @@ GEM
|
|
36
36
|
ast (2.4.0)
|
37
37
|
builder (3.2.3)
|
38
38
|
concurrent-ruby (1.1.5)
|
39
|
-
crass (1.0.
|
39
|
+
crass (1.0.6)
|
40
40
|
erubi (1.8.0)
|
41
|
-
graphql (1.
|
41
|
+
graphql (1.10.0)
|
42
42
|
i18n (1.6.0)
|
43
43
|
concurrent-ruby (~> 1.0)
|
44
44
|
jaro_winkler (1.5.3)
|
45
|
-
loofah (2.
|
45
|
+
loofah (2.4.0)
|
46
46
|
crass (~> 1.0.2)
|
47
47
|
nokogiri (>= 1.5.9)
|
48
48
|
method_source (0.9.2)
|
49
49
|
mini_portile2 (2.4.0)
|
50
50
|
minitest (5.11.3)
|
51
|
-
nokogiri (1.10.
|
51
|
+
nokogiri (1.10.7)
|
52
52
|
mini_portile2 (~> 2.4.0)
|
53
53
|
parallel (1.17.0)
|
54
54
|
parser (2.6.3.0)
|
55
55
|
ast (~> 2.4.0)
|
56
56
|
psych (3.1.0)
|
57
|
-
rack (2.0.
|
57
|
+
rack (2.0.8)
|
58
58
|
rack-test (1.1.0)
|
59
59
|
rack (>= 1.0, < 3)
|
60
60
|
rails-dom-testing (2.0.3)
|
Binary file
|
@@ -21,7 +21,14 @@ module GraphqlLazyLoad
|
|
21
21
|
return if already_loaded_or_queued?
|
22
22
|
# use copy of object so it doesnt add preload to associations.
|
23
23
|
# this is so associations dont get loaded to object passed so different scopes get reloaded
|
24
|
-
lazy_objects.add(
|
24
|
+
lazy_objects.add(
|
25
|
+
object_class.column_names.reduce(object_class.new) do |acc, column|
|
26
|
+
# only iterate over column in db so if select fields outside usual model
|
27
|
+
# values wont throw error
|
28
|
+
acc.send("#{column}=", type.object.send(column))
|
29
|
+
acc
|
30
|
+
end
|
31
|
+
)
|
25
32
|
lazy_ids.add(object_id)
|
26
33
|
end
|
27
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql_lazy_load
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathon Gardner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- bin/setup
|
143
143
|
- gems/graphql_lazy_load-0.1.0.gem
|
144
144
|
- gems/graphql_lazy_load-0.2.0.gem
|
145
|
+
- gems/graphql_lazy_load-0.3.0.gem
|
145
146
|
- graphql_lazy_load.gemspec
|
146
147
|
- lib/graphql_lazy_load.rb
|
147
148
|
- lib/graphql_lazy_load/active_record_relation.rb
|