diff --git a/lib/mobilizon_web/schema/user.ex b/lib/mobilizon_web/schema/user.ex index ebbc73815..24ec29ffa 100644 --- a/lib/mobilizon_web/schema/user.ex +++ b/lib/mobilizon_web/schema/user.ex @@ -67,7 +67,7 @@ defmodule MobilizonWeb.Schema.UserType do arg(:limit, :integer, default_value: 10) arg(:sort, :sortable_user_field, default_value: :id) - arg(:direction, :sort_direction, default_value: :asc) + arg(:direction, :sort_direction, default_value: :desc) resolve(&User.list_and_count_users/3) end diff --git a/test/mobilizon_web/resolvers/user_resolver_test.exs b/test/mobilizon_web/resolvers/user_resolver_test.exs index 2fcfd5c87..f38e866b2 100644 --- a/test/mobilizon_web/resolvers/user_resolver_test.exs +++ b/test/mobilizon_web/resolvers/user_resolver_test.exs @@ -99,9 +99,9 @@ defmodule MobilizonWeb.Resolvers.UserResolverTest do assert json_response(res, 200)["data"]["users"]["elements"] |> Enum.map(& &1["email"]) == [ - "riri@example.com", + "loulou@example.com", "fifi@example.com", - "loulou@example.com" + "riri@example.com" ] query = """