Relative Content

Tag Archive for node.jsmongodbmongoosenestjs

Introspective timestamp fields with Mongoose and NestJS

End Goal: Find an easy way to have timestamps (createdAt and updatedAt) appended to Mongoose Schemas (using NestJS decorators) and have them be introspective in Apollo sandbox without having to specify the fields on every Schema. I want other developers to be able to specify a new class that we would use as a collection, and have these fields added, be selectable through code, and be introspective through the Sandbox for ease of development. We might add other fields in the future.