title: How to setState() in React/Apollo with graphQL
body: <p>I am trying to setState() to a query result I have from graphQL, but I am having difficulty finding out how to do this because it will always be loading, or it's only used from props. 
  I first set the state</p>
  
  <pre><code>constructor (props) {
          super(props);
          this.state = { data: [] };
  </code></pre>
  
  <p>Then I have this query</p>
  
  <pre><code>const AllParams = gql`
      query AllParamsQuery {
          params {
              id,
              param,
              input
          }
      }`
  </code></pre>
  
  <p>And when it comes back I can access it with <code>this.props.AllParamsQuery.params</code></p>
  
  <p><strong>How and when should I</strong> <code>this.setState({ data: this.props.AllParamsQuery.params })</code> <strong>without it returning</strong> <code>{data: undefined}</code><strong>?</strong></p>
  
  <p>I haven't found a way to make it wait while it's <code>undefined</code> AKA <code>loading: true</code> then <code>setState</code>. I've tried <code>componentDidMount()</code> and <code>componentWillReceiveProps()</code> including a <code>async function(){...await...}</code> but was unsuccessful, I am likely doing it wrong. Any one know how to do this correctly or have an example? </p>
  
  <p><strong>EDIT + Answer</strong>: you should not setstate and just leave it in props. Check out this link: "Why setting props as state in react.js is blasphemy" <a href="http://johnnyji.me/react/2015/06/26/why-setting-props-as-state-in-react-is-blasphemy.html" rel="noreferrer">http://johnnyji.me/react/2015/06/26/why-setting-props-as-state-in-react-is-blasphemy.html</a> 
  There is more to the problem to update props, but some great examples can be found at this app creation tutorial: <a href="https://www.howtographql.com/react-apollo/8-subscriptions/" rel="noreferrer">https://www.howtographql.com/react-apollo/8-subscriptions/</a></p>