title: RxSwift: Chain Completable to Observable
body: <p>I'd like to chain a Completable to an observable element. After calling <em>flatMap</em>, onCompleted and onError callbacks don't seem to be called on subscription.</p>
  
  <pre><code>var user = PublishRelay&lt;User&gt;()
  
  func fetchUserInformation(_ userId: String) -&gt; Completable {
      return Completable.create { observer in
          apiService.fetchInformation(for: userId, completion: { response in
              if let name = response?.name {
                  user.accept(User(name: name))
                  observer(.completed)
              } else {
                  observer(.error(ServiceError.userInformation))
              }
          })
          return Disposables.create()
      }
  }
  
  login()
  .flatMap{ userId in fetchUserInformation(userId) }
  .subscribe(
      onCompleted: {
          print("Success!") // Not being called at all
      },
      onError: { error in
          print(error)  // Not being called at all
      }
  ).disposed(by: disposeBag)
  </code></pre>
  
  <p>Although <em>fetchUserInformation</em> and <em>observer(.completed)</em> are being called and user information is being successfully fetched, I won't be able to catch <em>onCompleted</em> on subscription (only when preceded by <em>flatMap</em>).</p>
  
  <p>Is there a clean way to achieve this?</p>
  
  <blockquote>
    <p>Already tried <em>.materialized()</em> just after the <em>flatMap</em> call in order to get an </p>
  
  <pre><code>    Observable&lt;Event&lt;Never&gt;&gt;
  </code></pre>
    
    <p>rather than a </p>
  
  <pre><code>    Observable&lt;Never&gt;
  </code></pre>
    
    <p>It doesn't work either.</p>
  </blockquote>