Safely serialize JavaScript expressions to a superset of JSON, which includes Dates, BigInts, and more. - GitHub - blitz-js/superjson: Safely serialize JavaScript expressions to a superset of JSON,...
Hey @RevolutionWhales did you ever solve this problem? Just ran into it myself, exactly as you described. After adding superjson and using mongoose/mongo, the ObjectId is serialized to the client as a string, but the types on the client still think its an ObjectId.