graphql_helper_generator 0.0.30 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79eb26879ede6b0db47ae7d5f90e615db3899251fb9967e70f7b3f219c997014
|
4
|
+
data.tar.gz: ddee13f7d9a8ce8fdcfbfc220c85444b76ef83d902631a6d2f8611efba14b64d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edf6f2107a74de5049d964a4ea07078ed9ebb87484c74a20aa53658fcde9025dcb8771ce392fdf500ff108f9dfff725ccd1d32b0fa6aab90287629d7ef2293a3
|
7
|
+
data.tar.gz: 3b7d800f902fc9001caeaa70497ddbc6c3e9488e4b11ebe6a7310c8da605d1b9064907e57afe94a78d4ea4d32dbe8478390634cfbc193e2ae323838e3f99d1ad
|
@@ -167,7 +167,6 @@ class GraphqlModelGenerator < Rails::Generators::NamedBase
|
|
167
167
|
if field[:type] == 'references' then name += 'Id' end
|
168
168
|
str = "$" + name + ": "
|
169
169
|
type = cast_to_graphql_input(field)
|
170
|
-
if field[:array].present? then type = '[' + type + ']' end
|
171
170
|
str += type
|
172
171
|
if field[:required].present? then str += "!" end
|
173
172
|
str
|
@@ -322,6 +321,9 @@ class GraphqlModelGenerator < Rails::Generators::NamedBase
|
|
322
321
|
elsif type == 'Integer' then type = 'Int'
|
323
322
|
elsif type == 'References' then type = 'ID'
|
324
323
|
end
|
324
|
+
|
325
|
+
if field[:array].present? then type = '['+type+']' end
|
326
|
+
|
325
327
|
type
|
326
328
|
end
|
327
329
|
|
@@ -13,7 +13,7 @@ FactoryBot.define do
|
|
13
13
|
when "datetime"
|
14
14
|
"(Time.now + #{rand(1..5)}.hours).to_s"
|
15
15
|
when "json"
|
16
|
-
{"hello": "world", "new": 1}
|
16
|
+
{"hello": "world", "new": "1"}
|
17
17
|
when "references"
|
18
18
|
"create(:#{field[:name]})"
|
19
19
|
else
|
@@ -39,7 +39,7 @@ FactoryBot.define do
|
|
39
39
|
when "datetime"
|
40
40
|
"(Time.now + #{rand(1..5)}.hours).to_s"
|
41
41
|
when "json"
|
42
|
-
{"hello": "updated_world", "new_field": 100}
|
42
|
+
{"hello": "updated_world", "new_field": "100"}
|
43
43
|
when "references"
|
44
44
|
"create(:#{field[:name]})"
|
45
45
|
else
|