Reputation: 4513
Let's say we have the following query (taken from the spec):
mutation Root {
first: changeTheNumber(newNumber: 1) {
theNumber
}
second: changeTheNumber(newNumber: 3) {
theNumber
}
third: changeTheNumber(newNumber: 2) {
theNumber
}
}
Assuming the error occured during execution of second mutation, how GraphQL server implementation should act in such case: should the third mutation be evaluated or something else?
Upvotes: 0
Views: 84
Reputation: 3399
According to the JavaScript reference implementation for GraphQL, the same mutation changeTheNumber
of the selection set will be executed in the given order. If error occurs in the second mutation, its result will be an Error object. The following mutations in that selection set will not be aborted.
Upvotes: 1