Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongoose schema. #1

Open
smooJitter opened this issue Jan 9, 2017 · 1 comment
Open

Mongoose schema. #1

smooJitter opened this issue Jan 9, 2017 · 1 comment

Comments

@smooJitter
Copy link

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?

@tomitrescak
Copy link
Owner

@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 ;(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants