souls 0.65.1 → 0.65.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/souls/cli/generate/mutation.rb +6 -1
- data/lib/souls/cli/generate/mutation_rbs.rb +1 -1
- data/lib/souls/cli/generate/type_rbs.rb +6 -1
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +1 -1
- 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: 823211ff017cc0697fcc8934588a99c7a57944c926ec55a792a805253d8bb69b
|
4
|
+
data.tar.gz: 3c0a44c8218f52c427762f82e9cf7d15acf16223e99d31e6e9d410b93375465c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e65fb7ad445b4eca17874fe5bd64dc70b64d42762811983869cc372d69a14670fcd706a88f08305f337caf5d54018f3a588ce2663df7c4b5b8d5692221c2cb91
|
7
|
+
data.tar.gz: aaa7277667d84c1798ca10511045f4086db1834b983660bae67138dfebef1dadb6736a6094d019bd0aa48752b9fbb224bb3f569995fc0f9d7b39dc38d942e2f1
|
@@ -45,6 +45,8 @@ module Souls
|
|
45
45
|
type = Souls.type_check(param[:type])
|
46
46
|
type = "[#{type}]" if param[:array]
|
47
47
|
type = "String" if param[:column_name].match?(/$*_id\z/)
|
48
|
+
next if params[:column_name] == "user_id"
|
49
|
+
|
48
50
|
if i == params[:params].size - 1
|
49
51
|
f.write(" argument :#{param[:column_name]}, #{type}, required: false\n\n")
|
50
52
|
f.write(" def resolve(args)\n")
|
@@ -105,6 +107,7 @@ module Souls
|
|
105
107
|
field :#{singularized_class_name}_edge, Types::#{singularized_class_name.camelize}Type.edge_type, null: false
|
106
108
|
field :error, String, null: true
|
107
109
|
|
110
|
+
argument :id, String, required: true
|
108
111
|
TEXT
|
109
112
|
end
|
110
113
|
|
@@ -113,6 +116,8 @@ module Souls
|
|
113
116
|
type = Souls.type_check(param[:type])
|
114
117
|
type = "[#{type}]" if param[:array]
|
115
118
|
type = "String" if param[:column_name].match?(/$*_id\z/)
|
119
|
+
next if col[:column_name] == "user_id"
|
120
|
+
|
116
121
|
if i == params[:params].size - 1
|
117
122
|
f.write(" argument :#{param[:column_name]}, #{type}, required: false\n\n")
|
118
123
|
f.write(" def resolve(args)\n")
|
@@ -138,7 +143,7 @@ module Souls
|
|
138
143
|
f.write(" data = ::#{singularized_class_name.camelize}.find(article_id)\n")
|
139
144
|
f.write(" data.update(new_record)\n")
|
140
145
|
else
|
141
|
-
f.write(" data = ::#{singularized_class_name.camelize}.find(
|
146
|
+
f.write(" data = ::#{singularized_class_name.camelize}.find(args[:id])\n")
|
142
147
|
f.write(" data.update(args)\n")
|
143
148
|
end
|
144
149
|
end
|
@@ -43,7 +43,7 @@ module Souls
|
|
43
43
|
if i == params[:params].size - 1
|
44
44
|
f.write(" #{param[:column_name]}: #{type}?\n")
|
45
45
|
elsif param[:column_name].match?(/$*_id\z/)
|
46
|
-
f.write(" #{param[:column_name]}: String
|
46
|
+
f.write(" #{param[:column_name]}: String?,\n")
|
47
47
|
else
|
48
48
|
f.write(" #{param[:column_name]}: #{type}?,\n")
|
49
49
|
end
|
@@ -25,7 +25,12 @@ module Souls
|
|
25
25
|
type = "[#{type}]" if param[:array]
|
26
26
|
rbs_type = Souls.rbs_type_check(param[:type])
|
27
27
|
if i.zero?
|
28
|
-
|
28
|
+
if params[:column_name].match?(/$*_id\z/)
|
29
|
+
col_name = param[:column_name].gsub("_id", "")
|
30
|
+
f.write(" def self.field: (:#{col_name}, untyped, null: false) -> untyped\n")
|
31
|
+
else
|
32
|
+
f.write(" def self.field: (:#{param[:column_name]}, #{type}, null: true) -> #{rbs_type}\n")
|
33
|
+
end
|
29
34
|
elsif param[:column_name].match?(/$*_id\z/)
|
30
35
|
col_name = param[:column_name].gsub("_id", "")
|
31
36
|
f.write(" | (:#{col_name}, untyped, null: false) -> untyped\n")
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.44.
|
1
|
+
0.44.2
|
@@ -1 +1 @@
|
|
1
|
-
0.44.
|
1
|
+
0.44.2
|