You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run a Mutation like the following using Graphiti, I get race conditions and unexpected results. The only explanation I have for this is that they are running in parallel. Am I missing something? Thanks!
@cshadek Could you provide a more fleshed-out code example that displays the race conditions and unexpected results?
I did some initial testing and was unable to create the data races/unexpected results you describe. The "like" was always added, removed, and then added again without any ID conflict.
Note that while the top-level mutations execute in series, the GraphQL resolution pattern (concurrent or serial) is always outer-to-inner, so the .... field resolvers are not guaranteed to run before the next mutation occurs. The spec reflects this by specifying that only the top level selection set of the mutation is run serially.
The GraphQL spec specifies that the top level fields in mutations should execute serially.
http://spec.graphql.org/June2018/#sec-Mutation
When I run a Mutation like the following using Graphiti, I get race conditions and unexpected results. The only explanation I have for this is that they are running in parallel. Am I missing something? Thanks!
The text was updated successfully, but these errors were encountered: