graphql-activerecord 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbefcc53e87e244a7244d23d78409e16fbec44e4
|
4
|
+
data.tar.gz: f566c6909cc03a8e6a7a3aa19620a35951f6eb8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9517d487ec69c2d4f505dba3dc9c686e9ee33de6e1fffa463eebd86f1aeb8d34f947603b0dacd5198925c18ed0320f35cd655d36de283dafa3f24bba53a19efc
|
7
|
+
data.tar.gz: 65ea1b55f1a0d6afa022ac9e1682254e9c9bc65a53a28879e709523af734fc1b83becf2885672b4e0f339263992e59b0be5b2593284c4c87eb0ded3bdc750d54
|
@@ -53,6 +53,8 @@ module GraphQL::Models
|
|
53
53
|
matches = match_inputs_to_models(parent_model, child_map, next_inputs, changes)
|
54
54
|
|
55
55
|
matches.each do |match|
|
56
|
+
next if match[:child_model].nil? && match[:child_inputs].nil?
|
57
|
+
|
56
58
|
child_changes = apply_changes(child_map, match[:child_model], match[:child_inputs], context)
|
57
59
|
|
58
60
|
if match[:input_path]
|
@@ -71,7 +73,10 @@ module GraphQL::Models
|
|
71
73
|
if !child_map.has_many
|
72
74
|
child_model = model.public_send(child_map.association)
|
73
75
|
|
74
|
-
|
76
|
+
if next_inputs.nil? && !child_model.nil?
|
77
|
+
child_model.mark_for_destruction
|
78
|
+
changes.push({ model_instance: child_model, action: :destroy })
|
79
|
+
elsif child_model.nil? && !next_inputs.nil?
|
75
80
|
child_model = model.public_send("build_#{child_map.association}")
|
76
81
|
changes.push({ model_instance: child_model, action: :create })
|
77
82
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Foster
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|