private function parseSingleMutationResult(array $res) { $mutationResult = $res['mutationResults'][0]; if (isset($mutationResult['conflictDetected'])) { throw new DomainException('A conflict was detected in the mutation. ' . 'The operation failed.'); } return $mutationResult['version']; }