-
Notifications
You must be signed in to change notification settings - Fork 5
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
methods do not know what info to provide #6
Comments
Each method can just provide the information it is asked for. If something is expensive to calculate or look up, just don't do it until explicitly asked for that item. For example, if you have an "Item" with method foo and bar which are expensive:
with a query like this:
It will call |
Hi Curt,
is something like
which provides for reading as well as writing. Regards, |
btw; |
It is really up to you to organize things that way. If you do a mutation type activity within a query method, nothing will stop you. I've just been making a 'top-level' |
ah, another overlooked thing. I knew that it was possible to do modifications in a query but that it wasn't recommended. Studying your code I see that the schema must be set using Anyway, thanks for your help, |
Users can ask things via a query but can also leave out items they do not need in the query. The methods, on the other hand, do not know what is left out from the query and must provide all data. This could involve expensive calculations or database lookups.
The text was updated successfully, but these errors were encountered: