Open smooJitter opened 7 years ago
How does this play with mongoose.
For example, consider we have a schema like this
const UserSchema = new mongoose.Schema({ username: { type: String, required: true }, mobileNumber: { type: String }, createdAt: { type: Date, default: Date.now } });
Where the mongodb collection is tied to the mongoose model like usually
User = mongoose.model('User', UserSchema);
I gather the graphQL schema is sufficient? And thus any input and default behaviors should be handled via the Entity definition?
@smooJitter unfortunately this is made to work with native mongo driver. The whole apckage is optimised to run with it. I use Typescript and GraphQL (Apollo) so I have no need for mongoose ;(
How does this play with mongoose.
For example, consider we have a schema like this
const UserSchema = new mongoose.Schema({ username: { type: String, required: true }, mobileNumber: { type: String }, createdAt: { type: Date, default: Date.now } });
Where the mongodb collection is tied to the mongoose model like usually
User = mongoose.model('User', UserSchema);
I gather the graphQL schema is sufficient? And thus any input and default behaviors should be handled via the Entity definition?