Convex Ents not working after updating to 0.5.0
This code now throws this error:
const chatsFromTheUser = await ctx
.table("users")
.getX("clerkId", identity.tokenIdentifier)
.edge("chats")
.map(async (chat) => ({
// Type error: Parameter 'chat' implicitly has an 'any' type.
...chat,
users: await chat.edge("users"),
}));
chatsFromTheUser.forEach((chat) => {
const userIds = chat.users.map((user) => user.clerkId);
if (userIds.includes(user1.clerkId) && userIds.includes(user2.clerkId)) {
throw new ConvexError("Chat already created.");
}
}); const chatsFromTheUser = await ctx
.table("users")
.getX("clerkId", identity.tokenIdentifier)
.edge("chats")
.map(async (chat) => ({
// Type error: Parameter 'chat' implicitly has an 'any' type.
...chat,
users: await chat.edge("users"),
}));
chatsFromTheUser.forEach((chat) => {
const userIds = chat.users.map((user) => user.clerkId);
if (userIds.includes(user1.clerkId) && userIds.includes(user2.clerkId)) {
throw new ConvexError("Chat already created.");
}
});