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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cdd100ae786dce970917ecca2ea6941e024b238cd0622ede22a62d2c7c545fb
4
- data.tar.gz: dad9d75980069a8e7ee8b063c0d82d5f60eade85f85f3cb3493e6a3522dfc259
3
+ metadata.gz: bd8f09f2d20473471b902e0e0cbe5b6b2751ce41385b74e0e3e8216496ced0cb
4
+ data.tar.gz: 4db8d9d165dd508950cc4f3fcf309a239fa59ad8d29029a4aca746a1e5757167
5
5
  SHA512:
6
- metadata.gz: 7dcef71047487561e73d1c2ed5f5ec0e192c19f6f93fe0652bad2eb378c0b57e9e1875a5ae7e6ff3aef32e7bad4d106360e611c71154a988f37097dccbc43c2c
7
- data.tar.gz: 44f35b6eccd266c5d163f1007b023537b6fa0a8f2efaab701169a512fa1a57a38ffaf50532ebddc5e637322670cf3ccf2bb8c97d8577708a29eb3d47d91d9dfd
6
+ metadata.gz: 8161b52e0c16e0992b169a8f310e608dca89c5b152eac390e926d2266c964a365a6506bc358400e69efb77d0be42e41ead3e7c6b0a929c28a925faeca2340eb0
7
+ data.tar.gz: be16119ba0c47e7a875d948e0fed3335108085852c12e6d721794e293cdce39b10ee21ddeff239c42e5dcb3b738d211bd5e06af8650b84bb8ffb9d0c945fa8d7
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeepUnrest
4
- VERSION = '0.1.62'
4
+ VERSION = '0.1.63'
5
5
  end
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] = val
389
- when Hash
390
- cursor[key] = val
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_unrest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.62
4
+ version: 0.1.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lynn Hurley