-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update eagerly fetching section #2147
base: master
Are you sure you want to change the base?
Update eagerly fetching section #2147
Conversation
This fixes the docs so that the generate command will correctly generate the User resolver.
This is not a solution. Please read carefully the docs and other issues and questions. |
This is not an issue at all. |
@frederikhors I'm not sure what you mean. The docs in the https://gqlgen.com/getting-started are incorrect, specifically the https://gqlgen.com/getting-started/#dont-eagerly-fetch-the-user. If you compare code snippets to the code in the completed tutorial here https://github.com/vektah/gqlgen-tutorials/tree/master/gettingstarted you can see that they are clearly different. |
Can you compare your fix with #2157 and see if it addresses your concern fully? |
@StevenACoffman it does not. The PR does not address the issue properly nor does it address all of the issues. Adding the resolver section to the gqlgen config is not necessary because once you update the This is not needed.
Its also missing the update the the |
@theverything, in gqlgen there are two different ways to do this. And they are both in docs. |
@frederikhors @StevenACoffman After the user finishes the the tutorial their code should look exactly like the code in the link referenced in the tutorial itself. Found here https://github.com/99designs/gqlgen/blob/master/docs/content/getting-started.md?plain=1#L15 @frederikhors I understand there is multiple ways to create a resolver but why have the user use both solutions when only one is necessary |
I was confused by the getting-started eager-fetching section as well. I came upon this PR while searching around to see if others were confused as well. While searching around, this issue comment got me to look closer at the github README and see the explanation about the two different eager-fetching solutions. I haven't found this info yet on https://gqlgen.com docs. That particular README section and the link to the completed tutorial code cleared up this topic for me. |
This fixes the docs so that the generate command will correctly generate the User resolver.
Discussions about this can be found here #2146 and here #2144
I have: