graphql-activerecord 0.6.6 → 0.6.7
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: ea206475115f125b4737f85251ee149550462dc0
|
4
|
+
data.tar.gz: e5c43b72e56875f407ec79d54e08678f765deadd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 710667348e3cbc1287f5b65b1d999d3f4b303e675bd851360dd5169e87be220e105b0ee6aa4bd0aaf1602d70712f76c64a87e21e00a68b9fc46248c5a1b88563
|
7
|
+
data.tar.gz: dc098d499193ad53caa7fcd80d2042b5daf64ffa62a4b8dee3a04e9b9f4bd89ef7ec0f874dc93953b0e2b243db39f32a2cf1f578515023948b0e253fe9a068bd
|
@@ -78,6 +78,17 @@ module GraphQL::Models
|
|
78
78
|
changes.push({ model_instance: child_model, action: :destroy })
|
79
79
|
elsif child_model.nil? && !next_inputs.nil?
|
80
80
|
child_model = model.public_send("build_#{child_map.association}")
|
81
|
+
|
82
|
+
assoc = model.association(child_map.association)
|
83
|
+
refl = assoc.reflection
|
84
|
+
|
85
|
+
if refl.options.include?(:as)
|
86
|
+
inverse_name = refl.options[:as]
|
87
|
+
inverse_assoc = child_model.association(inverse_name)
|
88
|
+
inverse_assoc.target = model
|
89
|
+
inverse_assoc.inversed = true
|
90
|
+
end
|
91
|
+
|
81
92
|
changes.push({ model_instance: child_model, action: :create })
|
82
93
|
end
|
83
94
|
|
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.7
|
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-07-
|
11
|
+
date: 2016-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.4.8
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: ActiveRecord helpers for GraphQL + Relay
|