Skip to content

Conversation

edgareler
Copy link
Contributor

Similar to #28, but uses Model.find().exec() as promise, and checks if the collection parameter is Model.

@lorensr
Copy link
Member

lorensr commented Jun 29, 2020

Is there a benefit to using exec?

@edgareler
Copy link
Contributor Author

According to Mongoose docs, that gives you better stack traces.

@lorensr
Copy link
Member

lorensr commented Jun 29, 2020

Sounds good, and thanks for the contribution! Would you mind adding a test to cover the new logic?

@edgareler
Copy link
Contributor Author

Hi @lorensr, I've just included two new ID matchers to the existing tests, which basically covers the Model vs Collection issue.

@lorensr lorensr merged commit 6f39f9b into GraphQLGuide:master Jul 15, 2020
@lorensr
Copy link
Member

lorensr commented Jul 15, 2020

Thanks again! Published in 0.2.7

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

Successfully merging this pull request may close these issues.

2 participants