hq-graphql 2.1.3 → 2.1.4

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: 50ee2af7af4309a1fb549c15b88abdb8bda3454eacfdce5136f1997b814c52fb
4
- data.tar.gz: 9dc0b893d4ad8bf8a999cba996224488be9c394e55f83ef979460ac19f96c381
3
+ metadata.gz: cffa70521d220d85df139e5dab62fec20a97b121578dea7d5fa6cc0991c46501
4
+ data.tar.gz: b6d9949097849efdd3002dacfc46fe5bf000830d7c86d47bc8f4bfb743321d5a
5
5
  SHA512:
6
- metadata.gz: f4940761bdccfd01c867e21f69ab66a5459d8b151024ebd79679906ea62fa6c5d2208ce311a339ed720021c2b43221e51ebb092de8f4bff87a15bc3e3f07f376
7
- data.tar.gz: 00a7683630411f065d954132918b3449ef6aec9419de30702dd43bf99ad34fb8dbaf5ee1ae248759f3029006db3863257fe86a99d7b89a7456123c82d52ef7b3
6
+ metadata.gz: 3d3933664e856fba5c7111dbea3e6fd6fa653aa5ec170ce5ff6a800d07573d5791290745651513a04ae57e1f2171b38b93d48961350b8bc7a5f9af01fffad507
7
+ data.tar.gz: 4029d92a6198a414fac136c1b87c850aa94ca92e789065cea70c0e31b0c8e3cdaf3578c1b068bfb367d362e0499580223269f3e467773c57e0621e8a3aa627c1
@@ -64,9 +64,11 @@ module HQ
64
64
 
65
65
  def field_from_association(association, auto_nil:, internal_association: false, &block)
66
66
  association_klass = association.klass
67
- name = association.name
68
- klass = model_klass
69
- type = Types[association_klass]
67
+ name = association.name.to_s
68
+ return if fields[name]
69
+
70
+ klass = model_klass
71
+ type = Types[association_klass]
70
72
  case association.macro
71
73
  when :has_many
72
74
  field name, [type], null: false, klass: model_name do
@@ -88,7 +90,10 @@ module HQ
88
90
  end
89
91
 
90
92
  def field_from_column(column, auto_nil:)
91
- field column.name, Types.type_from_column(column), null: !auto_nil || column.null
93
+ name = column.name
94
+ return if fields[name]
95
+
96
+ field name, Types.type_from_column(column), null: !auto_nil || column.null
92
97
  end
93
98
 
94
99
  def association_required?(association)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module HQ
4
4
  module GraphQL
5
- VERSION = "2.1.3"
5
+ VERSION = "2.1.4"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hq-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Jones