-
Notifications
You must be signed in to change notification settings - Fork 3
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
Questions from workshop 1 #2
Comments
1 This doc does a good job explaining/breaking down the resolver map https://www.apollographql.com/docs/graphql-tools/resolvers/#resolver-function-signature. What it names The rule for the type of For example, the
https://graphql-code-generator.com is able to generate the correct type for The generated types aren't the most strait forward to read through, but looking at the definition for |
2 I'm not quite sure I fully understand this question. Specifically, i'm uncertain about what you mean by "since it has to resolve every field of every object". But, will try to answer, let me know if this gets at what you were wondering about. When resolving a GraphQL query, on the server, only the field resolvers for fields specified in the query will be executed. Similarly, only data for those fields will be encoded and sent to the client. A benefit of this, when compared to a traditional REST endpoint, would be that clients can specific only the fields they need to use. This helps clients minimize the size of the corresponding response. So if anything, I would say that GraphQL is more optimal in this regard when compared to REST. |
The text was updated successfully, but these errors were encountered: