Allow event's attributedTo to use the Dataloader
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
06050c9cd6
commit
0541fb0ada
|
@ -56,7 +56,10 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
|
||||||
description: "The event's organizer (as a person)"
|
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),
|
field(:tags, list_of(:tag),
|
||||||
resolve: &Tag.list_tags_for_event/3,
|
resolve: &Tag.list_tags_for_event/3,
|
||||||
|
|
Loading…
Reference in a new issue