Introduce event language detection
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -54,6 +54,8 @@ defmodule Mobilizon.GraphQL.Schema.Discussions.CommentType do
|
||||
field(:is_announcement, non_null(:boolean),
|
||||
description: "Whether this comment needs to be announced to participants"
|
||||
)
|
||||
|
||||
field(:language, non_null(:string), description: "The comment language")
|
||||
end
|
||||
|
||||
@desc "The list of visibility options for a comment"
|
||||
@@ -89,6 +91,7 @@ defmodule Mobilizon.GraphQL.Schema.Discussions.CommentType do
|
||||
arg(:text, non_null(:string), description: "The comment's body")
|
||||
arg(:event_id, non_null(:id), description: "The event under which this comment is")
|
||||
arg(:in_reply_to_comment_id, :id, description: "The comment ID this one replies to")
|
||||
arg(:language, :string, description: "The comment language", default_value: "und")
|
||||
|
||||
arg(:is_announcement, :boolean, description: "Should this comment be announced to everyone?")
|
||||
|
||||
@@ -99,6 +102,7 @@ defmodule Mobilizon.GraphQL.Schema.Discussions.CommentType do
|
||||
field :update_comment, type: :comment do
|
||||
arg(:text, non_null(:string), description: "The comment updated body")
|
||||
arg(:comment_id, non_null(:id), description: "The comment ID")
|
||||
arg(:language, :string, description: "The comment language", default_value: "und")
|
||||
|
||||
arg(:is_announcement, :boolean, description: "Should this comment be announced to everyone?")
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
|
||||
field(:inserted_at, :datetime, description: "When the event was created")
|
||||
field(:options, :event_options, description: "The event options")
|
||||
field(:metadata, list_of(:event_metadata), description: "A key-value list of metadata")
|
||||
field(:language, non_null(:string), description: "The event language")
|
||||
end
|
||||
|
||||
@desc "The list of visibility options for an event"
|
||||
@@ -401,6 +402,7 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
|
||||
)
|
||||
|
||||
arg(:contacts, list_of(:contact), default_value: [], description: "The events contacts")
|
||||
arg(:language, :string, description: "The event language", default_value: "und")
|
||||
|
||||
resolve(&Event.create_event/3)
|
||||
end
|
||||
@@ -444,6 +446,7 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
|
||||
arg(:metadata, list_of(:event_metadata_input), description: "The event metadata")
|
||||
arg(:draft, :boolean, description: "Whether or not the event is a draft")
|
||||
arg(:contacts, list_of(:contact), default_value: [], description: "The events contacts")
|
||||
arg(:language, :string, description: "The event language", default_value: "und")
|
||||
|
||||
resolve(&Event.update_event/3)
|
||||
end
|
||||
|
||||
@@ -20,6 +20,7 @@ defmodule Mobilizon.GraphQL.Schema.PostType do
|
||||
field(:publish_at, :datetime, description: "When the post was published")
|
||||
field(:inserted_at, :datetime, description: "The post's creation date")
|
||||
field(:updated_at, :datetime, description: "The post's last update date")
|
||||
field(:language, non_null(:string), description: "The post language")
|
||||
|
||||
field(:tags, list_of(:tag),
|
||||
resolve: &Tag.list_tags_for_post/3,
|
||||
@@ -71,6 +72,7 @@ defmodule Mobilizon.GraphQL.Schema.PostType do
|
||||
arg(:draft, :boolean, default_value: false, description: "Whether the post is a draft")
|
||||
arg(:visibility, :post_visibility, description: "The post's visibility")
|
||||
arg(:publish_at, :datetime, description: "The post's publish date")
|
||||
arg(:language, :string, description: "The post language", default_value: "und")
|
||||
|
||||
arg(:tags, list_of(:string),
|
||||
default_value: [],
|
||||
@@ -93,6 +95,7 @@ defmodule Mobilizon.GraphQL.Schema.PostType do
|
||||
arg(:attributed_to_id, :id, description: "The group the post is attributed to")
|
||||
arg(:draft, :boolean, description: "Whether the post is a draft")
|
||||
arg(:visibility, :post_visibility, description: "The post's visibility")
|
||||
arg(:language, :string, description: "The post language", default_value: "und")
|
||||
|
||||
arg(:publish_at, :datetime,
|
||||
description: "The time when the posts is going to be or has been published"
|
||||
|
||||
Reference in New Issue
Block a user