Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 5a31709

Browse files
authored
Merge pull request #261 from coderplanets/upgrade-absinthe
chore(deps): upgrade absinthe to latest (1.6)
2 parents b1db245 + d70888f commit 5a31709

30 files changed

+77
-82
lines changed

lib/groupher_server/mailer/email.ex

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ defmodule GroupherServer.Email do
77
import Bamboo.Email
88
import Helper.Utils, only: [get_config: 2]
99

10-
alias GroupherServer.{Accounts, Billing, CMS, Email, Mailer}
10+
alias GroupherServer.{Accounts, Billing, Email, Mailer}
1111

1212
alias Accounts.User
1313
alias Billing.BillRecord
14-
# alias CMS.{Post, Job, Repo, Video}
1514
alias Email.Templates
1615
alias Mailer
1716

lib/groupher_server_web/controller/og_controller.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ defmodule GroupherServerWeb.Controller.OG do
2626
error_response(conn, url)
2727
end
2828

29-
defp ok_response(conn, url, %OpenGraph{title: nil, description: description} = info)
29+
defp ok_response(conn, _url, %OpenGraph{title: nil, description: description} = info)
3030
when not is_nil(description) do
3131
json(conn, %{
3232
success: 1,
@@ -40,7 +40,7 @@ defmodule GroupherServerWeb.Controller.OG do
4040
})
4141
end
4242

43-
defp ok_response(conn, url, info) do
43+
defp ok_response(conn, _url, info) do
4444
json(conn, %{
4545
success: 1,
4646
meta: %{

lib/groupher_server_web/schema/account/account_queries.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ defmodule GroupherServerWeb.Schema.Account.Queries do
7171
resolve(&R.Accounts.list_favorite_categories/3)
7272
end
7373

74-
@doc "paged stared posts"
74+
@desc "paged stared posts"
7575
field :stared_posts, :paged_posts do
7676
arg(:user_id, non_null(:id))
7777
arg(:filter, non_null(:paged_filter))
@@ -81,7 +81,7 @@ defmodule GroupherServerWeb.Schema.Account.Queries do
8181
resolve(&R.Accounts.stared_contents/3)
8282
end
8383

84-
@doc "paged stared jobs"
84+
@desc "paged stared jobs"
8585
field :stared_jobs, :paged_jobs do
8686
arg(:user_id, non_null(:id))
8787
arg(:filter, non_null(:paged_filter))
@@ -91,7 +91,7 @@ defmodule GroupherServerWeb.Schema.Account.Queries do
9191
resolve(&R.Accounts.stared_contents/3)
9292
end
9393

94-
@doc "paged stared videos"
94+
@desc "paged stared videos"
9595
field :stared_videos, :paged_videos do
9696
arg(:user_id, non_null(:id))
9797
arg(:filter, non_null(:paged_filter))

lib/groupher_server_web/schema/account/account_types.ex

+17-17
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,23 @@ defmodule GroupherServerWeb.Schema.Account.Types do
100100
resolve(&R.Accounts.editable_communities/3)
101101
end
102102

103-
@doc "get follower users count"
103+
@desc "get follower users count"
104104
field :followers_count, :integer do
105105
arg(:count, :count_type, default_value: :count)
106106

107107
resolve(dataloader(Accounts, :followers))
108108
middleware(M.ConvertToInt)
109109
end
110110

111-
@doc "get following users count"
111+
@desc "get following users count"
112112
field :followings_count, :integer do
113113
arg(:count, :count_type, default_value: :count)
114114

115115
resolve(dataloader(Accounts, :followings))
116116
middleware(M.ConvertToInt)
117117
end
118118

119-
@doc "wether viewer has followed"
119+
@desc "wether viewer has followed"
120120
field :viewer_has_followed, :boolean do
121121
arg(:viewer_did, :viewer_did_type, default_value: :viewer_did)
122122

@@ -126,7 +126,7 @@ defmodule GroupherServerWeb.Schema.Account.Types do
126126
middleware(M.ViewerDidConvert)
127127
end
128128

129-
@doc "paged stared posts"
129+
@desc "paged stared posts"
130130
field :stared_posts, :paged_posts do
131131
arg(:filter, non_null(:paged_filter))
132132
arg(:thread, :post_thread, default_value: :post)
@@ -135,7 +135,7 @@ defmodule GroupherServerWeb.Schema.Account.Types do
135135
resolve(&R.Accounts.stared_contents/3)
136136
end
137137

138-
@doc "paged stared jobs"
138+
@desc "paged stared jobs"
139139
field :stared_jobs, :paged_jobs do
140140
arg(:filter, non_null(:paged_filter))
141141
arg(:thread, :job_thread, default_value: :job)
@@ -144,7 +144,7 @@ defmodule GroupherServerWeb.Schema.Account.Types do
144144
resolve(&R.Accounts.stared_contents/3)
145145
end
146146

147-
@doc "paged stared videos"
147+
@desc "paged stared videos"
148148
field :stared_videos, :paged_videos do
149149
arg(:filter, non_null(:paged_filter))
150150
arg(:thread, :video_thread, default_value: :video)
@@ -153,7 +153,7 @@ defmodule GroupherServerWeb.Schema.Account.Types do
153153
resolve(&R.Accounts.stared_contents/3)
154154
end
155155

156-
@doc "paged favorited posts"
156+
@desc "paged favorited posts"
157157
field :favorited_posts, :paged_posts do
158158
arg(:filter, non_null(:paged_filter))
159159
arg(:thread, :post_thread, default_value: :post)
@@ -162,7 +162,7 @@ defmodule GroupherServerWeb.Schema.Account.Types do
162162
resolve(&R.Accounts.favorited_contents/3)
163163
end
164164

165-
@doc "paged favorited jobs"
165+
@desc "paged favorited jobs"
166166
field :favorited_jobs, :paged_jobs do
167167
arg(:filter, non_null(:paged_filter))
168168
arg(:thread, :job_thread, default_value: :job)
@@ -171,7 +171,7 @@ defmodule GroupherServerWeb.Schema.Account.Types do
171171
resolve(&R.Accounts.favorited_contents/3)
172172
end
173173

174-
@doc "paged favorited videos"
174+
@desc "paged favorited videos"
175175
field :favorited_videos, :paged_videos do
176176
arg(:filter, non_null(:paged_filter))
177177
arg(:thread, :video_thread, default_value: :video)
@@ -180,7 +180,7 @@ defmodule GroupherServerWeb.Schema.Account.Types do
180180
resolve(&R.Accounts.favorited_contents/3)
181181
end
182182

183-
@doc "paged favorited repos"
183+
@desc "paged favorited repos"
184184
field :favorited_repos, :paged_repos do
185185
arg(:filter, non_null(:paged_filter))
186186
arg(:thread, :repo_thread, default_value: :repo)
@@ -189,55 +189,55 @@ defmodule GroupherServerWeb.Schema.Account.Types do
189189
resolve(&R.Accounts.favorited_contents/3)
190190
end
191191

192-
@doc "total count of stared posts count"
192+
@desc "total count of stared posts count"
193193
field :stared_posts_count, :integer do
194194
arg(:count, :count_type, default_value: :count)
195195

196196
resolve(dataloader(Accounts, :stared_posts))
197197
middleware(M.ConvertToInt)
198198
end
199199

200-
@doc "total count of stared jobs count"
200+
@desc "total count of stared jobs count"
201201
field :stared_jobs_count, :integer do
202202
arg(:count, :count_type, default_value: :count)
203203

204204
resolve(dataloader(Accounts, :stared_jobs))
205205
middleware(M.ConvertToInt)
206206
end
207207

208-
@doc "total count of stared videos count"
208+
@desc "total count of stared videos count"
209209
field :stared_videos_count, :integer do
210210
arg(:count, :count_type, default_value: :count)
211211

212212
resolve(dataloader(Accounts, :stared_videos))
213213
middleware(M.ConvertToInt)
214214
end
215215

216-
@doc "total count of favorited posts count"
216+
@desc "total count of favorited posts count"
217217
field :favorited_posts_count, :integer do
218218
arg(:count, :count_type, default_value: :count)
219219

220220
resolve(dataloader(Accounts, :favorited_posts))
221221
middleware(M.ConvertToInt)
222222
end
223223

224-
@doc "total count of favorited jobs count"
224+
@desc "total count of favorited jobs count"
225225
field :favorited_jobs_count, :integer do
226226
arg(:count, :count_type, default_value: :count)
227227

228228
resolve(dataloader(Accounts, :favorited_jobs))
229229
middleware(M.ConvertToInt)
230230
end
231231

232-
@doc "total count of favorited videos count"
232+
@desc "total count of favorited videos count"
233233
field :favorited_videos_count, :integer do
234234
arg(:count, :count_type, default_value: :count)
235235

236236
resolve(dataloader(Accounts, :favorited_videos))
237237
middleware(M.ConvertToInt)
238238
end
239239

240-
@doc "total count of favorited videos count"
240+
@desc "total count of favorited videos count"
241241
field :favorited_repos_count, :integer do
242242
arg(:count, :count_type, default_value: :count)
243243

lib/groupher_server_web/schema/cms/cms_types.ex

+4-4
Original file line numberDiff line numberDiff line change
@@ -267,16 +267,16 @@ defmodule GroupherServerWeb.Schema.CMS.Types do
267267
field(:threads, list_of(:thread), resolve: dataloader(CMS, :threads))
268268
field(:categories, list_of(:category), resolve: dataloader(CMS, :categories))
269269

270-
@doc "total count of post contents"
270+
@desc "total count of post contents"
271271
content_counts_field(:post, CMS.Post)
272272

273-
@doc "total count of job contents"
273+
@desc "total count of job contents"
274274
content_counts_field(:job, CMS.Job)
275275

276-
@doc "total count of video contents"
276+
@desc "total count of video contents"
277277
content_counts_field(:video, CMS.Video)
278278

279-
@doc "total count of repo contents"
279+
@desc "total count of repo contents"
280280
content_counts_field(:repo, CMS.Repo)
281281

282282
field :subscribers, list_of(:user) do

lib/groupher_server_web/schema/delivery/delivery_types.ex

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
defmodule GroupherServerWeb.Schema.Delivery.Types do
22
use Absinthe.Schema.Notation
3-
use Absinthe.Ecto, repo: GroupherServer.Repo
43

54
import GroupherServerWeb.Schema.Utils.Helper
65
import Helper.Utils, only: [get_config: 2]
@@ -34,16 +33,16 @@ defmodule GroupherServerWeb.Schema.Delivery.Types do
3433
field(:read, :boolean)
3534
end
3635

37-
object :sys_notification do
38-
field(:id, :id)
36+
# object :sys_notification do
37+
# field(:id, :id)
3938

40-
field(:source_id, :string)
41-
field(:source_title, :string)
42-
field(:source_preview, :string)
43-
field(:source_type, :string)
39+
# field(:source_id, :string)
40+
# field(:source_title, :string)
41+
# field(:source_preview, :string)
42+
# field(:source_type, :string)
4443

45-
field(:read, :boolean)
46-
end
44+
# field(:read, :boolean)
45+
# end
4746

4847
object :notification do
4948
field(:id, :id)

lib/groupher_server_web/schema/statistics/statistics_types.ex

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
defmodule GroupherServerWeb.Schema.Statistics.Types do
22
use Absinthe.Schema.Notation
3-
use Absinthe.Ecto, repo: GroupherServer.Repo
43

54
# import GroupherServerWeb.Schema.Utils.Helper
65

lib/groupher_server_web/schema/utils/common_types.ex

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ defmodule GroupherServerWeb.Schema.Utils.CommonTypes do
55
import GroupherServerWeb.Schema.Utils.Helper
66

77
use Absinthe.Schema.Notation
8-
use Absinthe.Ecto, repo: GroupherServer.Repo
98

109
object :status do
1110
field(:done, :boolean)

lib/helper/gql_schema_suite.ex

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ defmodule Helper.GqlSchemaSuite do
66
defmacro __using__(_opts) do
77
quote do
88
use Absinthe.Schema.Notation
9-
use Absinthe.Ecto, repo: GroupherServer.Repo
109

1110
alias GroupherServerWeb.Resolvers, as: R
1211
alias GroupherServerWeb.Middleware, as: M

mix.exs

+3-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ defmodule GroupherServer.Mixfile do
6262
{:plug_cowboy, "~> 2.4.1"},
6363
{:plug, "~> 1.11.0"},
6464
# GraphQl tool
65-
{:absinthe, "~> 1.4.16"},
66-
{:absinthe_ecto, "~> 0.1.3"},
65+
{:absinthe, "~> 1.6.1"},
6766
# Plug support for Absinthe
68-
{:absinthe_plug, "~> 1.4.6"},
67+
{:absinthe_plug, "~> 1.5.4"},
6968
# Password hashing lib
7069
{:comeonin, "~> 5.1.1"},
7170
# CORS
@@ -80,7 +79,7 @@ defmodule GroupherServer.Mixfile do
8079
# {:scrivener_ecto, "~> 2.0.0"},
8180
{:guardian, "~> 2.0"},
8281
{:timex, "~> 3.6.1"},
83-
{:dataloader, "~> 1.0.2"},
82+
{:dataloader, "~> 1.0.7"},
8483
{:mix_test_watch, "~> 1.0.2", only: :dev, runtime: false},
8584
{:ex_unit_notifier, "~> 0.1", only: :test},
8685
{:apollo_tracing, "~> 0.4.3"},

mix.lock

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%{
2-
"absinthe": {:hex, :absinthe, "1.4.16", "0933e4d9f12652b12115d5709c0293a1bf78a22578032e9ad0dad4efee6b9eb1", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "076b8bd9552f4966ba1242f412f6c439b731169a36a0ddaaffcd3893828f5bf6"},
2+
"absinthe": {:hex, :absinthe, "1.6.1", "07bd1636027595c8d00d250a5878e617c24ccb25c84a08e807d8d00cf124696c", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f0105f1de6176ca50789081f2465389cb7afa438d54bf5133aeb3549f8f629f6"},
33
"absinthe_ecto": {:hex, :absinthe_ecto, "0.1.3", "420b68129e79fe4571a4838904ba03e282330d335da47729ad52ffd7b8c5fcb1", [:mix], [{:absinthe, "~> 1.3.0 or ~> 1.4.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, ">= 0.0.0", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm", "355b9db34abfab96ae1e025434b66e11002babcf4fe6b7144d26ff7548985f52"},
4-
"absinthe_plug": {:hex, :absinthe_plug, "1.4.7", "939b6b9e1c7abc6b399a5b49faa690a1fbb55b195c670aa35783b14b08ccec7a", [:mix], [{:absinthe, "~> 1.4.11", [hex: :absinthe, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.2 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "c6ecb0e56a963287ac252d0563e5b33b84b300ce8203d3d1410dddb5dc6d08e9"},
4+
"absinthe_plug": {:hex, :absinthe_plug, "1.5.4", "daff02d04be7c06d0114ef5b4361865a4dacbe8ddb325ce709b103253d4a014b", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:plug, "~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "80360cd8ad541d87c75336f3abc59b894d474458f6a7f8e563781c01148860de"},
55
"apollo_tracing": {:hex, :apollo_tracing, "0.4.3", "6bc56132f4ab87223b10dc7ab91bf4374ba4033411ba80873f9f89caf15d7476", [:mix], [{:absinthe, "~> 1.4", [hex: :absinthe, repo: "hexpm", optional: false]}, {:absinthe_plug, "~> 1.4", [hex: :absinthe_plug, repo: "hexpm", optional: true]}, {:jason, "~> 1.1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "150077363f588fa6881b77f936d7e671cfcaf6f6b4783b7682f6705c898bfc53"},
66
"argon2_elixir": {:hex, :argon2_elixir, "1.2.14", "0fc4bfbc1b7e459954987d3d2f3836befd72d63f3a355e3978f5005dd6e80816", [], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm"},
77
"bamboo": {:hex, :bamboo, "1.3.0", "9ab7c054f1c3435464efcba939396c29c5e1b28f73c34e1f169e0881297a3141", [:mix], [{:hackney, ">= 1.13.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "e1197188512d4a4458eaaad9a1659ce9eeb54a1b41574a9cd7507217b33e0f3e"},
@@ -19,7 +19,7 @@
1919
"cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"},
2020
"credo": {:hex, :credo, "1.4.0", "92339d4cbadd1e88b5ee43d427b639b68a11071b6f73854e33638e30a0ea11f5", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1fd3b70dce216574ce3c18bdf510b57e7c4c85c2ec9cad4bff854abaf7e58658"},
2121
"crontab": {:hex, :crontab, "1.1.7", "b9219f0bdc8678b94143655a8f229716c5810c0636a4489f98c0956137e53985", [:mix], [{:ecto, "~> 1.0 or ~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "01685acedf41cbfcf3f6cc7389ac0a73f9edcc185e6ce9fa7a5f32dd0402305d"},
22-
"dataloader": {:hex, :dataloader, "1.0.6", "fb724d6d3fb6acb87d27e3b32dea3a307936ad2d245faf9cf5221d1323d6a4ba", [:mix], [{:ecto, ">= 0.0.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "d16b82bc004038243236c73b76bef39be634828a4f4f4f9d637fb498ff886a10"},
22+
"dataloader": {:hex, :dataloader, "1.0.8", "114294362db98a613f231589246aa5b0ce847412e8e75c4c94f31f204d272cbf", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "eaf3c2aa2bc9dbd2f1e960561d616b7f593396c4754185b75904f6d66c82a667"},
2323
"db_connection": {:hex, :db_connection, "2.3.1", "4c9f3ed1ef37471cbdd2762d6655be11e38193904d9c5c1c9389f1b891a3088e", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "abaab61780dde30301d840417890bd9f74131041afd02174cf4e10635b3a63f5"},
2424
"decimal": {:hex, :decimal, "1.9.0", "83e8daf59631d632b171faabafb4a9f4242c514b0a06ba3df493951c08f64d07", [:mix], [], "hexpm", "b1f2343568eed6928f3e751cf2dffde95bfaa19dd95d09e8a9ea92ccfd6f7d85"},
2525
"dialyxir": {:hex, :dialyxir, "1.0.0", "6a1fa629f7881a9f5aaf3a78f094b2a51a0357c843871b8bc98824e7342d00a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "aeb06588145fac14ca08d8061a142d52753dbc2cf7f0d00fc1013f53f8654654"},
@@ -54,6 +54,7 @@
5454
"mix_test_watch": {:hex, :mix_test_watch, "1.0.2", "34900184cbbbc6b6ed616ed3a8ea9b791f9fd2088419352a6d3200525637f785", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}], "hexpm", "47ac558d8b06f684773972c6d04fcc15590abdb97aeb7666da19fcbfdc441a07"},
5555
"mochiweb": {:hex, :mochiweb, "2.20.1", "e4dbd0ed716f076366ecf62ada5755a844e1d95c781e8c77df1d4114be868cdf", [:rebar3], [], "hexpm", "d1aeee7870470d2fa9eae0b3d5ab6c33801aa2d82b10e9dade885c5c921b36aa"},
5656
"nanoid": {:hex, :nanoid, "2.0.2", "f3f7b4bf103ab6667f22beb00b6315825ee3f30100dd2c93d534e5c02164e857", [:mix], [], "hexpm", "3095cb1fac7bbc78843a8ccd99f1af375d0da1d3ebaa8552e846b73438c0c44f"},
57+
"nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"},
5758
"open_graph": {:hex, :open_graph, "0.0.4", "0790882d5735286abc8391b37d2707613ecd74ebdc5340be664d3df345cd8cae", [:mix], [{:httpoison, "~> 1.5", [hex: :httpoison, repo: "hexpm", optional: false]}], "hexpm", "a22a8ddaf9f881af38d519ced463627c37a8dea49a35cc27efdb9f2b839b9049"},
5859
"pangu": {:hex, :pangu, "0.1.0", "9f9e06418212017bb076034865462e92effed4e5b18c063d4448c186f12a6f0a", [:mix], [], "hexpm", "2634cc2463421757aca0a76665de83940d4fda12f8ed316ae929bb29f64d06c5"},
5960
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},

test/groupher_server_web/mutation/accounts/customization_test.exs

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ defmodule GroupherServer.Test.Mutation.Account.Customization do
5858
assert result["customization"]["displayDensity"] == "25"
5959
end
6060

61-
@paged_post_query """
62-
query($filter: PagedArticleFilter!) {
61+
@paged_posts_query """
62+
query($filter: PagedPostsFilter!) {
6363
pagedPosts(filter: $filter) {
64-
entries {
64+
entries {
6565
commentsCount
6666
commentsParticipators(filter: { first: 5 }) {
6767
id
@@ -85,7 +85,7 @@ defmodule GroupherServer.Test.Mutation.Account.Customization do
8585
user_conn |> mutation_result(@query, variables, "setCustomization")
8686

8787
variables = %{filter: %{page: 1}}
88-
results = user_conn |> query_result(@paged_post_query, variables, "pagedPosts")
88+
results = user_conn |> query_result(@paged_posts_query, variables, "pagedPosts")
8989
assert results["pageSize"] == @max_page_size
9090
end
9191

test/groupher_server_web/mutation/cms/cheatsheet_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ defmodule GroupherServer.Test.Mutation.CMS.Cheatsheet do
1818
end
1919

2020
@sync_cheatsheet_query """
21-
mutation($communityId: ID!, $readme: String!, $lastSync: String!){
21+
mutation($communityId: ID!, $readme: String!, $lastSync: DateTime!){
2222
syncCheatsheet(communityId: $communityId, readme: $readme, lastSync: $lastSync) {
2323
id
2424
readme

test/groupher_server_web/mutation/cms/cms_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ defmodule GroupherServer.Test.Mutation.CMS.Basic do
744744

745745
describe "[passport]" do
746746
@query """
747-
mutation($userId: ID!, $rules: String!) {
747+
mutation($userId: ID!, $rules: Json!) {
748748
stampCmsPassport(userId: $userId, rules: $rules) {
749749
id
750750
}

test/groupher_server_web/mutation/cms/job_reaction_test.exs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defmodule GroupherServer.Test.Mutation.JobReaction do
1515

1616
describe "[job star]" do
1717
@query """
18-
mutation($id: ID!, $action: String!, $thread: CmsThread!) {
18+
mutation($id: ID!, $action: ReactableAction!, $thread: ReactThread!) {
1919
reaction(id: $id, action: $action, thread: $thread) {
2020
id
2121
}
@@ -36,7 +36,7 @@ defmodule GroupherServer.Test.Mutation.JobReaction do
3636
end
3737

3838
@query """
39-
mutation($id: ID!, $action: String!, $thread: CmsThread!) {
39+
mutation($id: ID!, $action: ReactableAction!, $thread: ReactThread!) {
4040
undoReaction(id: $id, action: $action, thread: $thread) {
4141
id
4242
}

0 commit comments

Comments
 (0)