Changes to the actor - user relation

Now the GraphQL API replies mostly with users which have the default_actor
property filled to show profile information

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-11-29 17:43:22 +01:00
parent 6f15127cb0
commit 51aa511101
10 changed files with 232 additions and 123 deletions

View File

@@ -202,7 +202,6 @@ defmodule MobilizonWeb.Schema do
object :login do
field(:token, non_null(:string), description: "A JWT Token for this session")
field(:user, non_null(:user), description: "The user associated to this session")
field(:person, non_null(:person), description: "The person associated to this session")
end
@desc "An event"
@@ -480,8 +479,8 @@ defmodule MobilizonWeb.Schema do
resolve(&Resolvers.Category.create_category/3)
end
@desc "Create an user (returns an actor)"
field :create_user, type: :person do
@desc "Create an user"
field :create_user, type: :user do
arg(:email, non_null(:string))
arg(:password, non_null(:string))
arg(:username, non_null(:string))