fix(graphql): set default value for resource type parameter

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-12-06 14:43:51 +01:00
parent 94bf2e53bf
commit 09f41328ab
4 changed files with 10 additions and 5 deletions

View File

@@ -22,7 +22,12 @@ defmodule Mobilizon.GraphQL.Schema.ResourceType do
field(:inserted_at, :naive_datetime, description: "The resource's creation date")
field(:updated_at, :naive_datetime, description: "The resource's last update date")
field(:published_at, :naive_datetime, description: "The resource's publication date")
field(:type, :string, description: "The resource's type (if it's a folder)")
field(:type, :string,
default_value: "link",
description: "The resource's type (if it's a folder)"
)
field(:path, :string, description: "The resource's path")
field(:parent, :resource,