ent/load: safely marshaling schema

Summary: more descriptive output on marshaling failures.

Reviewed By: alexsn

Differential Revision: D16782294

fbshipit-source-id: 4ac3fbb3ef152d59bada257a9f0d8ccde5e95ae9
This commit is contained in:
Ariel Mashraki
2019-08-13 03:02:44 -07:00
committed by Facebook Github Bot
parent c0deedcf48
commit 74ce5b36f2
4 changed files with 91 additions and 4 deletions

16
entc/load/testdata/failure/user.go vendored Normal file
View File

@@ -0,0 +1,16 @@
package failure
import (
"fbc/ent"
"fbc/ent/schema/edge"
)
type User struct {
ent.Schema
}
func (User) Edges() []ent.Edge {
return []ent.Edge{
edge.To("panic", User{}.Type),
}
}