Skip to content

Deterministic order for bulk mutation that uses multiple different remote schemas? #9474

Discussion options

You must be logged in to vote

From the GraphQL spec, emphasis mine:

If the operation is a mutation, the result of the operation is the result of executing the operation’s top level selection set on the mutation root object type. This selection set should be executed serially.

It is expected that the top level fields in a mutation operation perform side-effects on the underlying data system. Serial execution of the provided mutations ensures against race conditions during these side-effects.

So yes, the root fields of a mutation are executed serially, and thus have a deterministic order of execution.

This of course assumes the remote schemas won't return a result until they are finished executing.

If the remote schem…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kevinmichaelchen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
None yet
2 participants