title: how to wait a graphql query is finished using apollo?
body: <p>I have the following code :</p>
  
  <pre><code>  ngOnInit() {
  
      this.data = this.apollo.query({ query: ResidentQuery }).subscribe(({data, loading}) =&gt; {
        this.data = data;
        this.loading = loading;
      });
  
      if (!this.loading) {
        // using this.data
      }
     }
  </code></pre>
  
  <p>I want data to be loaded before processed themm after the (!this.loading). It is not the case as loading is asynchronous. How I can wait the data is loaded before using them ?</p>
  
  <p>I am making a graphql query using apollo client. ResidentQuery is a string containing the graphql query.</p>
  
  <p>Thank you for your feedbacks !</p>