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

Question about concurrent sub-resolvers #515

Closed
qhenkart opened this issue Jan 26, 2019 · 1 comment
Closed

Question about concurrent sub-resolvers #515

qhenkart opened this issue Jan 26, 2019 · 1 comment

Comments

@qhenkart
Copy link
Contributor

qhenkart commented Jan 26, 2019

in my use-case a sub-resolver would make a separate call to the database, or perhaps a separate call to another microservice. However based on the answer in #422 (comment) , it seems like method binding is not intended to make new queries to microservices or databases, so please correct me if my mental model is wrong because I don't see any other way to add subresolvers other than method binding

I see how I can make this work synchronously, but sometimes I want things to work concurrently, especially if the subresolver isn't directly related to the root resolver. In the documentation it says that if I provide context as the first parameter in the method it will run in parallel, but in my testing, this is not the case (and not always desired either, since I need the context to make subsequent calls).

This is a pretty general question, I am just trying to soak in as much about this library as possible before starting major development so any tidbits of information would be very appreciated

@qhenkart
Copy link
Contributor Author

from digging in the code I see that there is a go-routine created for the method bind with context, but the moment in which the go routine is executed was not intuitive to me so I did not pick it up during my testing

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