Skip to content

Include Model on createCachingMethods loader #30

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

Merged
merged 2 commits into from
Jul 15, 2020

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