Hi got this this error with this code, seems like I missed an inverse edge but I have no clue where and why:
Error fetching POST https://youthful-caribou-100.convex.cloud/api/prepare_schema 400 Bad Request: Error: Hit an error while evaluating your schema:
Uncaught Error: Missing inverse edge in table "messages" for edge "messages" in table "privateChats"
at defineEntSchema (../node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected][email protected]__react_3e36zvrjeuxn2krcacprafz7ny/node_modules/convex-ents/src/schema.ts:144:12)
at <anonymous> (../convex/schema.ts:4:28)
const schema = defineEntSchema({
privateChats: defineEnt({})
.field("support", v.boolean(), { default: false })
.edges("users", { to: "users" })
.edges("messages"),
users: defineEnt({})
.field("clerkId", v.string(), { unique: true })
.field("username", v.string(), { unique: true })
.field("firstName", v.optional(v.string()))
.field("lastName", v.optional(v.string()))
.edges("chats", { to: "privateChats" })
.edges("messages"),
messages: defineEnt({})
.field("content", v.string())
.edge("privateChats")
.edge("users"),
});
package.json: https://gist.github.com/FleetAdmiralJakob/a56f4a4f6d03c93b0773dd2dc0fbbbcc