graphiti 1.0.beta.2 → 1.0.beta.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.
- checksums.yaml +4 -4
- data/lib/graphiti/resource/sideloading.rb +7 -2
- data/lib/graphiti/resource_proxy.rb +3 -0
- data/lib/graphiti/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daa31821b2ed08b5dcfa8ab650ea11a9a9e60371
|
4
|
+
data.tar.gz: 1ea3ccdc81754648db6814386089a25e0d10818f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6733f538d3256a7ca7888c14e499542b0a4c2c5e95c361a7e2ec7f93709b43fc56a92c0a0cfa7a3b809613e793b75dd635a107caebe5781dc78fa53d309e24c
|
7
|
+
data.tar.gz: b3020aaaed2ae56ca5065fe73dfbea1b7b18552f0bb36411858190520ccc71555033c88005b81c6cf092067688cd3100546ba06a4d0071b565a4529c51c7c18e
|
@@ -109,9 +109,14 @@ module Graphiti
|
|
109
109
|
memo
|
110
110
|
end
|
111
111
|
|
112
|
+
# If eager loading, ensure routes are loaded first, then apply
|
113
|
+
# This happens in Railtie
|
112
114
|
def eagerly_apply_sideload?(sideload)
|
113
|
-
|
114
|
-
|
115
|
+
if defined?(::Rails)
|
116
|
+
::Rails.application.config.eager_load ? false : true
|
117
|
+
else
|
118
|
+
sideload.resource_class_loaded?
|
119
|
+
end
|
115
120
|
end
|
116
121
|
end
|
117
122
|
end
|
@@ -78,6 +78,9 @@ module Graphiti
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def save(action: :create)
|
81
|
+
# TODO: remove this. Only used for persisting many-to-many with AR
|
82
|
+
# (see activerecord adapter)
|
83
|
+
Graphiti.context[:namespace] = action
|
81
84
|
validator = persist do
|
82
85
|
@resource.persist_with_relationships \
|
83
86
|
@payload.meta(action: action),
|
data/lib/graphiti/version.rb
CHANGED