graphql-activerecord 0.5.1 → 0.5.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: c290d7eba123ca6319d2f0733350a11eb762cc1f
4
- data.tar.gz: 43a00144023a3d702be63f3e1bee2f5feb31e962
3
+ metadata.gz: 82ee89ea0f2df967d05e573d2ff89784353ca069
4
+ data.tar.gz: 3f4309e75320c8e04be52673f2e35524c033e84a
5
5
  SHA512:
6
- metadata.gz: 26c55b9965da8c366ea5167b2b1bcfc0d017b6b8e6d18a4a31ab9729a959bd22cb8bb12326ddc1d09c9b57bd3f8def1ca15a58b713928610393db8b3db9b6cde
7
- data.tar.gz: f0206418a86495e0df6af8f38ee62ff674f3e2709c96a42c5e697ebb613d7238b59fe40a6294c7b1c530c3e68b1d653151f58f20619011834a9d3126d8ad1466
6
+ metadata.gz: ea45a882f44162a8a3e46ff2022d5f4810a2c8666d7e4c71a726793bfda34393c1c1e2baf9ed6e46b9af07b9e8ec0d473c3a87a0a9aa20adc16fe51f1bde9d23
7
+ data.tar.gz: 079faa99c0df50e20c05b94b11dc619bde5bf1a2cfaa0a7673f01b1006608662ea5abec61b30dc24311a28c6376ee79d80b394aee841f6403af58698b29e730c
@@ -13,7 +13,15 @@ module GraphQL::Models
13
13
  end
14
14
 
15
15
  if field_map.leave_null_unchanged?
16
- input_field('unsetFields', types[!types.String])
16
+ field_names = field_map.fields.map { |f| f[:name] } + field_map.nested_maps.map { |m| m.name }
17
+ field_names = field_names.sort_by { |s| s }
18
+
19
+ enum = GraphQL::EnumType.define do
20
+ name "#{map_name_prefix}UnsettableFields"
21
+ field_names.each { |n| value(n, n.titleize, value: n) }
22
+ end
23
+
24
+ input_field('unsetFields', types[!enum])
17
25
  end
18
26
  end
19
27
 
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module Models
3
- VERSION = "0.5.1"
3
+ VERSION = "0.5.2"
4
4
  end
5
5
  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.5.1
4
+ version: 0.5.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-05-13 00:00:00.000000000 Z
11
+ date: 2016-05-16 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.4.8
93
+ rubygems_version: 2.5.1
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: ActiveRecord helpers for GraphQL + Relay