souls 0.65.0 → 0.65.4
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 +4 -4
- data/lib/souls/cli/generate/mutation.rb +6 -1
- data/lib/souls/cli/generate/mutation_rbs.rb +4 -0
- data/lib/souls/cli/generate/type_rbs.rb +7 -2
- 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: 57f8f27aa8628383a5be6f93140a07aa1a7a386f6b42859a538339f1f719ff44
|
4
|
+
data.tar.gz: 445b08e504ad79fc36b3c6ca60ef26ea04e299496284cdd7fc0b6753b8662a13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f67a5b0cc1784a43f38c12bca5d37e1d7dba8a36676476a22f878bbc9f0c2c0a48e759c65d9d148cbc63b63939875b93cedb78ccd0698fae94a95c62c7d71c96
|
7
|
+
data.tar.gz: 19649c52d26137a06dc0b8eb5e7cc55489ca02df5653abd216cf72ca39e2bd8c10d945649c216b2dc5e74de618ed8bf01dbdd6acd47254abeb4866b030e293bd
|
@@ -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 param[: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
|
@@ -42,6 +42,8 @@ module Souls
|
|
42
42
|
type = "[#{type}]" if param[:array]
|
43
43
|
if i == params[:params].size - 1
|
44
44
|
f.write(" #{param[:column_name]}: #{type}?\n")
|
45
|
+
elsif param[:column_name].match?(/$*_id\z/)
|
46
|
+
f.write(" #{param[:column_name]}: String?,\n")
|
45
47
|
else
|
46
48
|
f.write(" #{param[:column_name]}: #{type}?,\n")
|
47
49
|
end
|
@@ -60,6 +62,8 @@ module Souls
|
|
60
62
|
type = "[#{type}]" if param[:array]
|
61
63
|
if i.zero?
|
62
64
|
f.write(" def self.argument: (:#{param[:column_name]}, #{type}, required: false ) -> #{rbs_type}\n")
|
65
|
+
elsif param[:column_name].match?(/$*_id\z/)
|
66
|
+
f.write(" | (:#{param[:column_name]}, String, required: false ) -> String\n")
|
63
67
|
else
|
64
68
|
f.write(" | (:#{param[:column_name]}, #{type}, required: false ) -> #{rbs_type}\n")
|
65
69
|
end
|
@@ -25,10 +25,15 @@ 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 param[: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
|
-
f.write("
|
36
|
+
f.write(" | (:#{col_name}, untyped, null: false) -> untyped\n")
|
32
37
|
else
|
33
38
|
f.write(" | (:#{param[:column_name]}, #{type}, null: true) -> #{rbs_type}\n")
|
34
39
|
end
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.44.
|
1
|
+
0.44.4
|
@@ -1 +1 @@
|
|
1
|
-
0.44.
|
1
|
+
0.44.4
|