deep_unrest 0.1.62 → 0.1.63
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deep_unrest/version.rb +1 -1
- data/lib/deep_unrest.rb +9 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd8f09f2d20473471b902e0e0cbe5b6b2751ce41385b74e0e3e8216496ced0cb
|
4
|
+
data.tar.gz: 4db8d9d165dd508950cc4f3fcf309a239fa59ad8d29029a4aca746a1e5757167
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8161b52e0c16e0992b169a8f310e608dca89c5b152eac390e926d2266c964a365a6506bc358400e69efb77d0be42e41ead3e7c6b0a929c28a925faeca2340eb0
|
7
|
+
data.tar.gz: be16119ba0c47e7a875d948e0fed3335108085852c12e6d721794e293cdce39b10ee21ddeff239c42e5dcb3b738d211bd5e06af8650b84bb8ffb9d0c945fa8d7
|
data/lib/deep_unrest/version.rb
CHANGED
data/lib/deep_unrest.rb
CHANGED
@@ -324,8 +324,6 @@ module DeepUnrest
|
|
324
324
|
mutations.map { |val| convert_temp_ids!(ctx, val) }
|
325
325
|
end
|
326
326
|
mutations
|
327
|
-
rescue Exception => e
|
328
|
-
binding.pry
|
329
327
|
end
|
330
328
|
|
331
329
|
def self.build_mutation_fragment(op, scopes, user, err_path_memo, rest = nil, memo = nil, cursor = nil, type = nil)
|
@@ -384,10 +382,15 @@ module DeepUnrest
|
|
384
382
|
|
385
383
|
if path.empty?
|
386
384
|
case cursor
|
387
|
-
when Array
|
388
|
-
cursor[key]
|
389
|
-
|
390
|
-
|
385
|
+
when Array, Hash # only do anything if the cursor is iterable
|
386
|
+
case cursor[key]
|
387
|
+
when Hash # only attempt to merge if
|
388
|
+
cursor[key] = (cursor[key] || {}).deep_merge(val)
|
389
|
+
when Array
|
390
|
+
cursor[key] = (cursor[key] || []) + val
|
391
|
+
else
|
392
|
+
cursor[key] = val
|
393
|
+
end
|
391
394
|
end
|
392
395
|
return hash
|
393
396
|
end
|