Add GraphQL support to handle FeedTokens

Closes #88

Automatically create tokens for new users and actors

Closes #89

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-03-08 18:52:27 +01:00
parent c61c75163f
commit 99ac6ef100
14 changed files with 541 additions and 31 deletions

View File

@@ -8,6 +8,8 @@ defmodule MobilizonWeb.Schema.Actors.PersonType do
alias MobilizonWeb.Resolvers
import MobilizonWeb.Schema.Utils
import_types(MobilizonWeb.Schema.Events.FeedTokenType)
@desc """
Represents a person identity
"""
@@ -41,6 +43,11 @@ defmodule MobilizonWeb.Schema.Actors.PersonType do
field(:followersCount, :integer, description: "Number of followers for this actor")
field(:followingCount, :integer, description: "Number of actors following this actor")
field(:feed_tokens, list_of(:feed_token),
resolve: dataloader(Events),
description: "A list of the feed tokens for this person"
)
# This one should have a privacy setting
field(:organized_events, list_of(:event),
resolve: dataloader(Events),