Allow event's attributedTo to use the Dataloader

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-12-01 17:30:41 +01:00
parent 06050c9cd6
commit 0541fb0ada
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -56,7 +56,10 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
description: "The event's organizer (as a person)"
)
field(:attributed_to, :actor, description: "Who the event is attributed to (often a group)")
field(:attributed_to, :actor,
resolve: dataloader(Actors),
description: "Who the event is attributed to (often a group)"
)
field(:tags, list_of(:tag),
resolve: &Tag.list_tags_for_event/3,