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

Query Batching multi threaded? #1599

Closed
adaris-it opened this issue Mar 9, 2020 · 3 comments
Closed

Query Batching multi threaded? #1599

adaris-it opened this issue Mar 9, 2020 · 3 comments
Labels
question Developer asks to help him deal with some problem

Comments

@adaris-it
Copy link

adaris-it commented Mar 9, 2020

Hi
I'm wondering, how does GraphQL.NET handle batch queries under the hood? Does it execute each query in parallel using separate .NET tasks/threads ? Or sequential? And: Can this behavior be configured somehow?

In my opinion the following strategy would be ideal:

  • Queries should execute in parallel
  • Mutations shold execute sequentially in the order they were specified in the request (allows a mutation to depend on a preceeding mutation)

Thanks for clarifying.
Marco

@sungam3r
Copy link
Member

sungam3r commented Mar 9, 2020

Each query (fields inside this query) is executed in parallel. Each mutation sequentially. It meets the GraphQL specification.

For request batching no behavior described. Howewer this issue was posted. Now batched queries are executed sequentially but this topic specific to server repo, not to this project.

@sungam3r sungam3r added the question Developer asks to help him deal with some problem label Mar 9, 2020
@sungam3r
Copy link
Member

sungam3r commented Mar 9, 2020

Can this behavior be configured somehow?

Yes. You can override DocumentExecuter.SelectExecutionStrategy. For request batching there are no (yet) options in the server repo to configure parallel/sequential behaviour.

@adaris-it
Copy link
Author

Thanks a lot for your answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Developer asks to help him deal with some problem
Projects
None yet
Development

No branches or pull requests

2 participants