mirror of
https://github.com/ent/ent.git
synced 2026-04-28 13:40:56 +03:00
doc/md: fix NamedValues option in graphql tutorial (#2535)
* doc/md: fixing NamedValues option in Add Fields To The Schema example * Update doc/md/tutorial-todo-crud.md * Update doc/md/tutorial-todo-crud.md Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
This commit is contained in:
@@ -39,7 +39,13 @@ func (Todo) Fields() []ent.Field {
|
||||
Default(time.Now).
|
||||
Immutable(),
|
||||
field.Enum("status").
|
||||
Values("in_progress", "completed").
|
||||
NamedValues(
|
||||
"InProgress", "IN_PROGRESS",
|
||||
"Completed", "COMPLETED",
|
||||
).
|
||||
Annotations(
|
||||
entgql.OrderField("STATUS"),
|
||||
),
|
||||
Default("in_progress"),
|
||||
field.Int("priority").
|
||||
Default(0),
|
||||
|
||||
Reference in New Issue
Block a user