Multiple query fields are processed sequentially? #520
-
Hi everyone, According to the GraphQL spec, multiple query fields are processed in parallel by a GraphQL server (Ref), but when working with ariadne, I observed that the fields in a single query operation were being executed sequentially (I am using Django along with Is this the intended behavior, or am I missing something? Would be great if someone could help answer my doubt. PS: Sorry if this seems like a trivial doubt. I am relatively new to GraphQL and ariadne. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
GraphQL spec is written with one eye towards the Python counterpart provides two query execution strategies: async and sync. This is because async is opt-in in Python projects. Parallel execution holds true for |
Beta Was this translation helpful? Give feedback.
GraphQL spec is written with one eye towards the
graphql.js
which is reference implementation that supports asynchronous query execution.Python counterpart provides two query execution strategies: async and sync. This is because async is opt-in in Python projects.
wsgi.GraphQ
(as well asariadne.contrib.django.views.GraphQLView
) are using synchronous strategy because neitherWSGI
orDjango
are fully async stacks.Parallel execution holds true for
ariadne.asgi.GraphQL
.