Batching support

Multiple mutations can be specified in a single GraphQL request. An UpdatingBatch is used automatically on the server to execute these mutations in a single transactional batch.

There are typically no functional differences between executing multiple mutations in a batch rather than submitting multiple requests to execute each mutation by itself. However, if any mutation fails executing in a batch, the entire transaction is rolled back. This is usually the desired behavior.

There are minor differences in the way the mutations execute when operating in a batch. For example, a technique called “fetchless instantiation” is used more heavily when operating in a batch to allow the scenario where a referenced object doesn’t exist until an earlier mutation completes. Some of the error reporting may be different due to this behavior.

If for any reason the caller does not want to execute mutations in a batch, the alternative is to submit a single mutation in multiple requests.