You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportconstgetRoomMessages=query({args: {pager: paginationOptsValidator,roomId: v.id("rooms")},handler: async(ctx,{ pager, roomId })=>{constrooms=awaitctx.runQuery(api.services.chat.getUserRooms);constisUserPartOfRoom=rooms.find((room)=>room._id===roomId)!==undefined;if(!isUserPartOfRoom)thrownewConvexError("User is not in requested room");returnawaitctx.db.query("messages").filter((q)=>q.eq(q.field("room"),roomId)).paginate(pager);},});
it would be really cool if in the paginate or query methods there existed a populate method that i could use to populate the replyOf id field, similar to mongoose and mongo db
The text was updated successfully, but these errors were encountered:
I have this case that I think is applicable to a lot of people:
Below is a table in my schema:
and here is a function that paginates messages
it would be really cool if in the paginate or query methods there existed a populate method that i could use to populate the replyOf id field, similar to mongoose and mongo db
The text was updated successfully, but these errors were encountered: