Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit2ea73d3

Browse files
committed
fix(community): remove editors subscribers in community fields
1 parentca57175 commit2ea73d3

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

‎lib/groupher_server_web/schema/cms/cms_types.ex‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,6 @@ defmodule GroupherServerWeb.Schema.CMS.Types do
267267
field(:subscribers_count,:integer)
268268
field(:editors_count,:integer)
269269

270-
field:editors,list_of(:user)do
271-
arg(:filter,:members_filter)
272-
middleware(M.PageSizeProof)
273-
resolve(dataloader(CMS,:editors))
274-
end
275-
276270
# TODO: remove
277271
field:threads_count,:integerdo
278272
resolve(&R.CMS.threads_count/3)

‎test/groupher_server_web/query/cms/cms_test.exs‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -319,32 +319,21 @@ defmodule GroupherServer.Test.Query.CMS.Basic do
319319
community(id: $id) {
320320
id
321321
editorsCount
322-
editors {
323-
id
324-
nickname
325-
}
326322
}
327323
}
328324
"""
329325
@tag:wip2
330-
test"guest can get editorslist andcount of a community",~m(guest_conn community)ado
326+
test"guest can get editors count of a community",~m(guest_conn community)ado
331327
title="chief editor"
332328
{:ok,users}=db_insert_multi(:user,assert_v(:inner_page_size))
333329

334330
Enum.each(users,&CMS.set_editor(community,title,%User{id:&1.id}))
335331

336332
variables=%{id:community.id}
337333
results=guest_conn|>query_result(@query,variables,"community")
338-
editors=results["editors"]
339334
editors_count=results["editorsCount"]
340335

341-
[user_1,user_2,user_3,user_x]=users|>firstn_and_last(3)
342-
343336
assertresults["id"]==to_string(community.id)
344-
asserteditors|>Enum.any?(&(&1["id"]==to_string(user_1.id)))
345-
asserteditors|>Enum.any?(&(&1["id"]==to_string(user_2.id)))
346-
asserteditors|>Enum.any?(&(&1["id"]==to_string(user_3.id)))
347-
asserteditors|>Enum.any?(&(&1["id"]==to_string(user_x.id)))
348337
asserteditors_count==assert_v(:inner_page_size)
349338
end
350339

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp