Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-10-17 16:41:31 +02:00
parent 0613f7f736
commit b5672cee7e
108 changed files with 5221 additions and 1318 deletions

View File

@@ -8,7 +8,7 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
import Absinthe.Resolution.Helpers, only: [dataloader: 1, dataloader: 2]
alias Mobilizon.{Actors, Addresses, Discussions}
alias Mobilizon.GraphQL.Resolvers.{Event, Media, Tag}
alias Mobilizon.GraphQL.Resolvers.{Conversation, Event, Media, Tag}
alias Mobilizon.GraphQL.Schema
import_types(Schema.AddressType)
@@ -113,6 +113,18 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
field(:options, :event_options, description: "The event options")
field(:metadata, list_of(:event_metadata), description: "A key-value list of metadata")
field(:language, :string, description: "The event language")
field(:conversations, :paginated_conversation_list,
description: "The list of conversations started on this event"
) do
arg(:page, :integer,
default_value: 1,
description: "The page in the paginated conversation list"
)
arg(:limit, :integer, default_value: 10, description: "The limit of conversations per page")
resolve(&Conversation.find_conversations_for_event/3)
end
end
@desc "The list of visibility options for an event"