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

feat: allow query cancellation #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

paralin
Copy link

@paralin paralin commented Jan 2, 2017

Add a second function ExecuteWithContext which allows passing a net.Context with a query. This context can be canceled, which in turn cancels calling all of the remaining resolver functions. Furthermore, resolver functions can also handle cancellation of the context.

This has the added benefit of guaranteeing all resolvers will be canceled if the main Execute function returns early for any reason.

Signed-off-by: Christian Stewart [email protected]

Add a second function `ExecuteWithContext` which allows passing a
`net.Context` with a query. This context can be canceled, which in turn
cancels calling all of the remaining resolver functions. Furthermore,
resolver functions can also handle cancellation of the context.

This has the added benefit of guaranteeing all resolvers will be
canceled if the main Execute function returns early for any reason.

Signed-off-by: Christian Stewart <[email protected]>
@kumarharsh kumarharsh requested a review from atrniv January 5, 2017 19:07
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

Successfully merging this pull request may close these issues.

1 participant