When run 'go generate ./ent', got error on [create type Todo: invalid default value for enum field "status"] (#2746)

Because todo.graphql on tutorial-todo-gql.md says enum Status is "IN_PROGRESS"
This commit is contained in:
nine-hundred
2022-07-13 20:03:32 +09:00
committed by GitHub
parent 3148324cbe
commit dd4a0203e5

View File

@@ -46,7 +46,7 @@ func (Todo) Fields() []ent.Field {
Annotations(
entgql.OrderField("STATUS"),
).
Default("in_progress"),
Default("IN_PROGRESS"),
field.Int("priority").
Default(0),
}