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

Don't eagerly fetch the user #2301

Closed
imjamesku opened this issue Jul 22, 2022 · 1 comment
Closed

Don't eagerly fetch the user #2301

imjamesku opened this issue Jul 22, 2022 · 1 comment

Comments

@imjamesku
Copy link

imjamesku commented Jul 22, 2022

I was following the getting started guide and was confused about the "Don't eagerly fetch the user" part.

All it tells me to do was to enable autobind and replace the auto-generated User model with a maually created one. How does this allow "lazy loading" the user field? Wouldn't it be the same if I just implemented the User resolver without enabling autobind?

@imjamesku
Copy link
Author

I just found an explanation in the github README.md. The getting started guide was confusing to me, though. Maybe it could use an update.
For those who have the same question: https://github.com/99designs/gqlgen#how-do-i-prevent-fetching-child-objects-that-might-not-be-used

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

1 participant