Closed cshadek closed 1 year ago
@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.
Resolved by https://github.com/GraphQLSwift/GraphQL/pull/124
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!